OSDN Git Service

(split) LDP: Update ja.po snapshots.
[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-01 04:21+0900\n"
10 "PO-Revision-Date: 2012-05-07 12:17+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/mallopt.3:24 build/C/man2/mlock.2:27 build/C/man2/mmap.2:40
34 #: build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31
35 #: build/C/man2/msync.2:25 build/C/man2/posix_fadvise.2:27
36 #: build/C/man2/readahead.2:28 build/C/man2/remap_file_pages.2:26
37 #: build/C/man3/shm_open.3:26 build/C/man7/shm_overview.7:27
38 #: build/C/man2/shmctl.2:43 build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
39 #: build/C/man2/subpage_prot.2:28 build/C/man2/sync_file_range.2:30
40 #: build/C/man3/malloc_trim.3:24
41 #, no-wrap
42 msgid "Linux"
43 msgstr "Linux"
44
45 #. type: TH
46 #: build/C/man2/alloc_hugepages.2:25 build/C/man3/alloca.3:41
47 #: build/C/man2/cacheflush.2:24 build/C/man2/fallocate.2:8
48 #: build/C/man2/madvise.2:35 build/C/man3/malloc_hook.3:6
49 #: build/C/man3/mallopt.3:24 build/C/man2/mlock.2:27 build/C/man2/mmap.2:40
50 #: build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31
51 #: build/C/man2/msync.2:25 build/C/man3/mtrace.3:23
52 #: build/C/man2/posix_fadvise.2:27 build/C/man3/posix_fallocate.3:23
53 #: build/C/man3/posix_memalign.3:28 build/C/man2/readahead.2:28
54 #: build/C/man2/remap_file_pages.2:26 build/C/man3/shm_open.3:26
55 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:43
56 #: build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
57 #: build/C/man2/subpage_prot.2:28 build/C/man2/sync_file_range.2:30
58 #: build/C/man3/malloc_get_state.3:23 build/C/man3/malloc_trim.3:24
59 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mcheck.3:23
60 #, no-wrap
61 msgid "Linux Programmer's Manual"
62 msgstr "Linux Programmer's Manual"
63
64 #. type: SH
65 #: build/C/man2/alloc_hugepages.2:26 build/C/man3/alloca.3:42
66 #: build/C/man2/cacheflush.2:25 build/C/man2/fallocate.2:9
67 #: build/C/man2/madvise.2:36 build/C/man3/malloc_hook.3:7
68 #: build/C/man3/mallopt.3:25 build/C/man2/mlock.2:28 build/C/man2/mmap.2:41
69 #: build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:33 build/C/man2/mremap.2:32
70 #: build/C/man2/msync.2:26 build/C/man3/mtrace.3:24
71 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:24
72 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:29
73 #: build/C/man2/remap_file_pages.2:27 build/C/man3/shm_open.3:27
74 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:44
75 #: build/C/man2/shmget.2:37 build/C/man2/shmop.2:40
76 #: build/C/man2/subpage_prot.2:29 build/C/man2/sync_file_range.2:31
77 #: build/C/man3/malloc_get_state.3:24 build/C/man3/malloc_trim.3:25
78 #: build/C/man3/malloc_usable_size.3:24 build/C/man3/mcheck.3:24
79 #, no-wrap
80 msgid "NAME"
81 msgstr "名前"
82
83 #. type: Plain text
84 #: build/C/man2/alloc_hugepages.2:28
85 msgid "alloc_hugepages, free_hugepages - allocate or free huge pages"
86 msgstr ""
87 "alloc_hugepages, free_hugepages - 大きなサイズのページの割り当てと解放を行う"
88
89 #. type: SH
90 #: build/C/man2/alloc_hugepages.2:28 build/C/man3/alloca.3:44
91 #: build/C/man2/cacheflush.2:27 build/C/man2/fallocate.2:11
92 #: build/C/man2/madvise.2:38 build/C/man3/malloc_hook.3:11
93 #: build/C/man3/mallopt.3:27 build/C/man2/mlock.2:30 build/C/man2/mmap.2:43
94 #: build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:35 build/C/man2/mremap.2:34
95 #: build/C/man2/msync.2:28 build/C/man3/mtrace.3:26
96 #: build/C/man2/posix_fadvise.2:30 build/C/man3/posix_fallocate.3:26
97 #: build/C/man3/posix_memalign.3:31 build/C/man2/readahead.2:31
98 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:29
99 #: build/C/man2/shmctl.2:46 build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
100 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:33
101 #: build/C/man3/malloc_get_state.3:26 build/C/man3/malloc_trim.3:27
102 #: build/C/man3/malloc_usable_size.3:26 build/C/man3/mcheck.3:26
103 #, no-wrap
104 msgid "SYNOPSIS"
105 msgstr "書式"
106
107 #.  asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
108 #.  unsigned long len, int prot, int flag);
109 #. type: Plain text
110 #: build/C/man2/alloc_hugepages.2:34
111 #, no-wrap
112 msgid ""
113 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
114 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
115 msgstr ""
116 "B<void *alloc_hugepages(int >I<key>B<, void *>I<addr>B<, size_t >I<len>B<,>\n"
117 "B<                      int >I<prot>B<, int >I<flag>B<);>\n"
118
119 #.  asmlinkage int sys_free_hugepages(unsigned long addr);
120 #. type: Plain text
121 #: build/C/man2/alloc_hugepages.2:37
122 #, no-wrap
123 msgid "B<int free_hugepages(void *>I<addr>B<);>\n"
124 msgstr "B<int free_hugepages(void *>I<addr>B<);>\n"
125
126 #. type: SH
127 #: build/C/man2/alloc_hugepages.2:38 build/C/man3/alloca.3:48
128 #: build/C/man2/cacheflush.2:33 build/C/man2/fallocate.2:19
129 #: build/C/man2/madvise.2:50 build/C/man3/malloc_hook.3:29
130 #: build/C/man3/mallopt.3:31 build/C/man2/mlock.2:40 build/C/man2/mmap.2:52
131 #: build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:41 build/C/man2/mremap.2:43
132 #: build/C/man2/msync.2:32 build/C/man3/mtrace.3:32
133 #: build/C/man2/posix_fadvise.2:49 build/C/man3/posix_fallocate.3:44
134 #: build/C/man3/posix_memalign.3:83 build/C/man2/readahead.2:38
135 #: build/C/man2/remap_file_pages.2:37 build/C/man3/shm_open.3:41
136 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:54
137 #: build/C/man2/shmget.2:47 build/C/man2/shmop.2:51
138 #: build/C/man2/subpage_prot.2:36 build/C/man2/sync_file_range.2:41
139 #: build/C/man3/malloc_get_state.3:34 build/C/man3/malloc_trim.3:31
140 #: build/C/man3/malloc_usable_size.3:30 build/C/man3/mcheck.3:39
141 #, no-wrap
142 msgid "DESCRIPTION"
143 msgstr "説明"
144
145 #. type: Plain text
146 #: build/C/man2/alloc_hugepages.2:49
147 msgid ""
148 "The system calls B<alloc_hugepages>()  and B<free_hugepages>()  were "
149 "introduced in Linux 2.5.36 and removed again in 2.5.54.  They existed only "
150 "on i386 and ia64 (when built with B<CONFIG_HUGETLB_PAGE>).  In Linux 2.4.20 "
151 "the syscall numbers exist, but the calls fail with the error B<ENOSYS>."
152 msgstr ""
153 "システムコール B<alloc_hugepages>()  と B<free_hugepages>()  は Linux 2.5.36 "
154 "で導入され、2.5.54 で再び削除された。 これらのシステムコールは i386 と ia64 "
155 "のみで (かつ B<CONFIG_HUGETLB_PAGE> を指定してビルドされた場合に) 存在する。 "
156 "Linux 2.4.20 では syscall 番号が存在するが、 呼び出すとエラー B<ENOSYS> で失"
157 "敗する。"
158
159 #. type: Plain text
160 #: build/C/man2/alloc_hugepages.2:57
161 msgid ""
162 "On i386 the memory management hardware knows about ordinary pages (4 KiB)  "
163 "and huge pages (2 or 4 MiB).  Similarly ia64 knows about huge pages of "
164 "several sizes.  These system calls serve to map huge pages into the "
165 "process's memory or to free them again.  Huge pages are locked into memory, "
166 "and are not swapped."
167 msgstr ""
168 "i386 では、メモリ管理ハードウェアは通常のページ (4 KiB) と 大きなサイズのペー"
169 "ジ (以下、ヒュージページ; 2MiB または 4 MiB) を 扱うことができる。 同様に、"
170 "ia64 もいくつかのサイズのヒュージページを扱うことができる。 これらのシステム"
171 "コールは、ヒュージページをプロセスのメモリにマップしたり、 再び解放したりす"
172 "る。 ヒュージページはメモリ内にロックされ、スワップされない。"
173
174 #. type: Plain text
175 #: build/C/man2/alloc_hugepages.2:66
176 msgid ""
177 "The I<key> argument is an identifier.  When zero the pages are private, and "
178 "not inherited by children.  When positive the pages are shared with other "
179 "applications using the same I<key>, and inherited by child processes."
180 msgstr ""
181 "I<key> 引き数は識別子である。 0 の場合、ページは非公開になり、子プロセスに継"
182 "承されない。 正の場合、ページは同じ I<key> を使う他のアプリケーションと共有さ"
183 "れ、子プロセスに継承される。"
184
185 #. type: Plain text
186 #: build/C/man2/alloc_hugepages.2:81
187 msgid ""
188 "The I<addr> argument of B<free_hugepages>()  tells which page is being "
189 "freed: it was the return value of a call to B<alloc_hugepages>().  (The "
190 "memory is first actually freed when all users have released it.)  The "
191 "I<addr> argument of B<alloc_hugepages>()  is a hint, that the kernel may or "
192 "may not follow.  Addresses must be properly aligned."
193 msgstr ""
194 "B<free_hugepages>()  の I<addr> 引き数は、どのページを解放するかを指定する: "
195 "I<addr> は B<alloc_hugepages>()  の呼び出しの返り値である (全てのユーザがメモ"
196 "リを解放したときに、 そのメモリは初めて実際に解放される)。 B<alloc_hugepages>"
197 "()  の I<addr> 引き数はヒントであり、カーネルはそれに従うかもしれないし、 従"
198 "わないかもしれない。 アドレスは正しく配置されなければならない。"
199
200 #. type: Plain text
201 #: build/C/man2/alloc_hugepages.2:86
202 msgid ""
203 "The I<len> argument is the length of the required segment.  It must be a "
204 "multiple of the huge page size."
205 msgstr ""
206 "I<len> 引き数は要求されたセグメントの長さである。 これはヒュージページのサイ"
207 "ズの倍数にしなければならない。"
208
209 #. type: Plain text
210 #: build/C/man2/alloc_hugepages.2:94
211 msgid ""
212 "The I<prot> argument specifies the memory protection of the segment.  It is "
213 "one of B<PROT_READ>, B<PROT_WRITE>, B<PROT_EXEC>."
214 msgstr ""
215 "I<prot> 引き数はセグメントのメモリ保護を指定する。 これは B<PROT_READ>, "
216 "B<PROT_WRITE>, B<PROT_EXEC> のいずれかである。"
217
218 #. type: Plain text
219 #: build/C/man2/alloc_hugepages.2:109
220 msgid ""
221 "The I<flag> argument is ignored, unless I<key> is positive.  In that case, "
222 "if I<flag> is B<IPC_CREAT>, then a new huge page segment is created when "
223 "none with the given key existed.  If this flag is not set, then B<ENOENT> is "
224 "returned when no segment with the given key exists."
225 msgstr ""
226 "I<key> が正でない限り、 I<flag> 引き数は無視される。 I<key> が正で、かつ "
227 "I<flag> が B<IPC_CREAT> であり、かつ指定された I<key> で (セグメントが) 何も"
228 "存在しない場合、 新しいヒュージページセグメントが作成される。 I<flag> が設定"
229 "されておらず、かつ指定された I<key> のセグメントが存在しない場合、 B<ENOENT> "
230 "が返される。"
231
232 #. type: SH
233 #: build/C/man2/alloc_hugepages.2:109 build/C/man3/alloca.3:58
234 #: build/C/man2/cacheflush.2:52 build/C/man2/fallocate.2:109
235 #: build/C/man2/madvise.2:250 build/C/man3/mallopt.3:377
236 #: build/C/man2/mlock.2:117 build/C/man2/mmap.2:373 build/C/man2/mmap2.2:54
237 #: build/C/man2/mprotect.2:72 build/C/man2/mremap.2:128
238 #: build/C/man2/msync.2:68 build/C/man2/posix_fadvise.2:86
239 #: build/C/man3/posix_fallocate.3:64 build/C/man3/posix_memalign.3:141
240 #: build/C/man2/readahead.2:65 build/C/man2/remap_file_pages.2:122
241 #: build/C/man3/shm_open.3:169 build/C/man2/shmctl.2:272
242 #: build/C/man2/shmget.2:178 build/C/man2/shmop.2:169
243 #: build/C/man2/subpage_prot.2:61 build/C/man2/sync_file_range.2:141
244 #: build/C/man3/malloc_get_state.3:59 build/C/man3/malloc_trim.3:49
245 #: build/C/man3/malloc_usable_size.3:38 build/C/man3/mcheck.3:128
246 #, no-wrap
247 msgid "RETURN VALUE"
248 msgstr "返り値"
249
250 #. type: Plain text
251 #: build/C/man2/alloc_hugepages.2:118
252 msgid ""
253 "On success, B<alloc_hugepages>()  returns the allocated virtual address, and "
254 "B<free_hugepages>()  returns zero.  On error, -1 is returned, and I<errno> "
255 "is set appropriately."
256 msgstr ""
257 "成功した場合、 B<alloc_hugepages>()  は割り当てられた仮想アドレスを返し、 "
258 "B<free_hugepages>()  は 0 を返す。 失敗した場合、-1 を返し、 I<errno> が適切"
259 "に設定される。"
260
261 #. type: SH
262 #: build/C/man2/alloc_hugepages.2:118 build/C/man2/cacheflush.2:58
263 #: build/C/man2/fallocate.2:112 build/C/man2/madvise.2:257
264 #: build/C/man3/mallopt.3:382 build/C/man2/mlock.2:123 build/C/man2/mmap.2:390
265 #: build/C/man2/mmap2.2:61 build/C/man2/mprotect.2:79
266 #: build/C/man2/mremap.2:136 build/C/man2/msync.2:73
267 #: build/C/man2/posix_fadvise.2:89 build/C/man3/posix_fallocate.3:70
268 #: build/C/man3/posix_memalign.3:155 build/C/man2/readahead.2:71
269 #: build/C/man2/remap_file_pages.2:129 build/C/man3/shm_open.3:178
270 #: build/C/man2/shmctl.2:294 build/C/man2/shmget.2:182
271 #: build/C/man2/shmop.2:183 build/C/man2/subpage_prot.2:66
272 #: build/C/man2/sync_file_range.2:147 build/C/man3/malloc_trim.3:54
273 #, no-wrap
274 msgid "ERRORS"
275 msgstr "エラー"
276
277 #. type: TP
278 #: build/C/man2/alloc_hugepages.2:119 build/C/man2/fallocate.2:151
279 #, no-wrap
280 msgid "B<ENOSYS>"
281 msgstr "B<ENOSYS>"
282
283 #. type: Plain text
284 #: build/C/man2/alloc_hugepages.2:122
285 msgid "The system call is not supported on this kernel."
286 msgstr "このシステムコールはカーネルでサポートされていない。"
287
288 #. type: SH
289 #: build/C/man2/alloc_hugepages.2:122
290 #, no-wrap
291 msgid "FILES"
292 msgstr "ファイル"
293
294 #. type: Plain text
295 #: build/C/man2/alloc_hugepages.2:126
296 msgid ""
297 "I</proc/sys/vm/nr_hugepages> Number of configured hugetlb pages.  This can "
298 "be read and written."
299 msgstr ""
300 "I</proc/sys/vm/nr_hugepages> 設定された hugetlb ページの数。 このファイルは読"
301 "み書きできる。"
302
303 #. type: Plain text
304 #: build/C/man2/alloc_hugepages.2:130
305 msgid ""
306 "I</proc/meminfo> Gives info on the number of configured hugetlb pages and on "
307 "their size in the three variables HugePages_Total, HugePages_Free, "
308 "Hugepagesize."
309 msgstr ""
310 "I</proc/meminfo> 設定された hugetlb ページの数と、 3 つの変数 "
311 "HugePages_Total, HugePages_Free, Hugepagesize の サイズについての情報を提供す"
312 "る。"
313
314 #. type: SH
315 #: build/C/man2/alloc_hugepages.2:130 build/C/man3/alloca.3:63
316 #: build/C/man2/cacheflush.2:74 build/C/man2/fallocate.2:188
317 #: build/C/man2/madvise.2:307 build/C/man3/malloc_hook.3:76
318 #: build/C/man3/mallopt.3:390 build/C/man2/mlock.2:187 build/C/man2/mmap.2:483
319 #: build/C/man2/mmap2.2:77 build/C/man2/mprotect.2:107
320 #: build/C/man2/mremap.2:186 build/C/man2/msync.2:96 build/C/man3/mtrace.3:76
321 #: build/C/man2/posix_fadvise.2:111 build/C/man3/posix_fallocate.3:101
322 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
323 #: build/C/man2/remap_file_pages.2:151 build/C/man3/shm_open.3:249
324 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:366
325 #: build/C/man2/shmget.2:229 build/C/man2/shmop.2:226
326 #: build/C/man2/subpage_prot.2:91 build/C/man2/sync_file_range.2:180
327 #: build/C/man3/malloc_get_state.3:84 build/C/man3/malloc_trim.3:58
328 #: build/C/man3/malloc_usable_size.3:46 build/C/man3/mcheck.3:144
329 #, no-wrap
330 msgid "CONFORMING TO"
331 msgstr "準拠"
332
333 #. type: Plain text
334 #: build/C/man2/alloc_hugepages.2:133
335 msgid ""
336 "These calls are specific to Linux on Intel processors, and should not be "
337 "used in programs intended to be portable."
338 msgstr ""
339 "このシステムコールは Intel プロセッサ上の Linux に固有のものであり、 移植性が"
340 "必要なプログラムで使うべきでない。"
341
342 #. type: SH
343 #: build/C/man2/alloc_hugepages.2:133 build/C/man3/alloca.3:71
344 #: build/C/man2/madvise.2:328 build/C/man3/malloc_hook.3:78
345 #: build/C/man2/mlock.2:214 build/C/man2/mmap.2:501 build/C/man2/mmap2.2:79
346 #: build/C/man2/mprotect.2:116 build/C/man2/mremap.2:192
347 #: build/C/man3/mtrace.3:78 build/C/man2/posix_fadvise.2:120
348 #: build/C/man3/posix_memalign.3:219 build/C/man3/shm_open.3:255
349 #: build/C/man7/shm_overview.7:103 build/C/man2/shmctl.2:371
350 #: build/C/man2/shmget.2:235 build/C/man2/shmop.2:245
351 #: build/C/man2/subpage_prot.2:93 build/C/man2/sync_file_range.2:183
352 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_trim.3:60
353 #: build/C/man3/malloc_trim.3:72 build/C/man3/malloc_usable_size.3:48
354 #: build/C/man3/mcheck.3:146
355 #, no-wrap
356 msgid "NOTES"
357 msgstr "注意"
358
359 #. type: Plain text
360 #: build/C/man2/alloc_hugepages.2:141
361 msgid ""
362 "These system calls are gone; they existed only in Linux 2.5.36 through to "
363 "2.5.54.  Now the hugetlbfs file system can be used instead.  Memory backed "
364 "by huge pages (if the CPU supports them) is obtained by using B<mmap>(2)  to "
365 "map files in this virtual file system."
366 msgstr ""
367 "これらのシステムコールはなくなった。 これらは Linux 2.5.36 から 2.5.54 にのみ"
368 "存在する。 代わりに今は hugetlbfs ファイルシステムを使うことができる。 (CPU "
369 "がサポートしている場合) ヒュージページを持つメモリは、 B<mmap>(2)  を使ってこ"
370 "の仮想ファイルシステムでファイルをマップすることで取得できる。"
371
372 #. type: Plain text
373 #: build/C/man2/alloc_hugepages.2:145
374 msgid ""
375 "The maximal number of huge pages can be specified using the B<hugepages=> "
376 "boot parameter."
377 msgstr ""
378 "ヒュージページの最大数は、 B<hugepages=> 起動パラメータを使って指定できる。"
379
380 #. type: SH
381 #: build/C/man2/alloc_hugepages.2:150 build/C/man3/alloca.3:153
382 #: build/C/man2/cacheflush.2:88 build/C/man2/fallocate.2:195
383 #: build/C/man2/madvise.2:360 build/C/man3/malloc_hook.3:138
384 #: build/C/man3/mallopt.3:580 build/C/man2/mlock.2:337 build/C/man2/mmap.2:671
385 #: build/C/man2/mmap2.2:98 build/C/man2/mprotect.2:223
386 #: build/C/man2/mremap.2:214 build/C/man2/msync.2:122
387 #: build/C/man3/mtrace.3:170 build/C/man2/posix_fadvise.2:188
388 #: build/C/man3/posix_fallocate.3:130 build/C/man3/posix_memalign.3:275
389 #: build/C/man2/readahead.2:98 build/C/man2/remap_file_pages.2:162
390 #: build/C/man3/shm_open.3:280 build/C/man7/shm_overview.7:127
391 #: build/C/man2/shmctl.2:410 build/C/man2/shmget.2:298
392 #: build/C/man2/shmop.2:290 build/C/man2/subpage_prot.2:126
393 #: build/C/man2/sync_file_range.2:222 build/C/man3/malloc_get_state.3:112
394 #: build/C/man3/malloc_trim.3:80 build/C/man3/malloc_usable_size.3:62
395 #: build/C/man3/mcheck.3:211
396 #, no-wrap
397 msgid "COLOPHON"
398 msgstr "この文書について"
399
400 #. type: Plain text
401 #: build/C/man2/alloc_hugepages.2:157 build/C/man3/alloca.3:160
402 #: build/C/man2/cacheflush.2:95 build/C/man2/fallocate.2:202
403 #: build/C/man2/madvise.2:367 build/C/man3/malloc_hook.3:145
404 #: build/C/man3/mallopt.3:587 build/C/man2/mlock.2:344 build/C/man2/mmap.2:678
405 #: build/C/man2/mmap2.2:105 build/C/man2/mprotect.2:230
406 #: build/C/man2/mremap.2:221 build/C/man2/msync.2:129
407 #: build/C/man3/mtrace.3:177 build/C/man2/posix_fadvise.2:195
408 #: build/C/man3/posix_fallocate.3:137 build/C/man3/posix_memalign.3:282
409 #: build/C/man2/readahead.2:105 build/C/man2/remap_file_pages.2:169
410 #: build/C/man3/shm_open.3:287 build/C/man7/shm_overview.7:134
411 #: build/C/man2/shmctl.2:417 build/C/man2/shmget.2:305
412 #: build/C/man2/shmop.2:297 build/C/man2/subpage_prot.2:133
413 #: build/C/man2/sync_file_range.2:229 build/C/man3/malloc_get_state.3:119
414 #: build/C/man3/malloc_trim.3:87 build/C/man3/malloc_usable_size.3:69
415 #: build/C/man3/mcheck.3:218
416 msgid ""
417 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
418 "description of the project, and information about reporting bugs, can be "
419 "found at http://www.kernel.org/doc/man-pages/."
420 msgstr ""
421 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.40 の一部\n"
422 "である。プロジェクトの説明とバグ報告に関する情報は\n"
423 "http://www.kernel.org/doc/man-pages/ に書かれている。"
424
425 #. type: TH
426 #: build/C/man3/alloca.3:41
427 #, no-wrap
428 msgid "ALLOCA"
429 msgstr "ALLOCA"
430
431 #. type: TH
432 #: build/C/man3/alloca.3:41
433 #, no-wrap
434 msgid "2008-01-24"
435 msgstr "2008-01-24"
436
437 #. type: TH
438 #: build/C/man3/alloca.3:41 build/C/man3/malloc_hook.3:6
439 #: build/C/man3/mtrace.3:23 build/C/man3/posix_fallocate.3:23
440 #: build/C/man3/posix_memalign.3:28 build/C/man3/malloc_get_state.3:23
441 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mcheck.3:23
442 #, no-wrap
443 msgid "GNU"
444 msgstr "GNU"
445
446 #. type: Plain text
447 #: build/C/man3/alloca.3:44
448 msgid "alloca - allocate memory that is automatically freed"
449 msgstr "alloca - 自動的に解放されるメモリを割り当てる"
450
451 #. type: Plain text
452 #: build/C/man3/alloca.3:46
453 msgid "B<#include E<lt>alloca.hE<gt>>"
454 msgstr "B<#include E<lt>alloca.hE<gt>>"
455
456 #. type: Plain text
457 #: build/C/man3/alloca.3:48
458 msgid "B<void *alloca(size_t >I<size>B<);>"
459 msgstr "B<void *alloca(size_t >I<size>B<);>"
460
461 #. type: Plain text
462 #: build/C/man3/alloca.3:58
463 msgid ""
464 "The B<alloca>()  function allocates I<size> bytes of space in the stack "
465 "frame of the caller.  This temporary space is automatically freed when the "
466 "function that called B<alloca>()  returns to its caller."
467 msgstr ""
468 "B<alloca>()  関数は、 I<size> バイトの領域を呼出元のスタック・フレームに割り"
469 "付ける。 この一時的な領域は、 B<alloca>()  を呼び出した関数が呼出元に返るとき"
470 "に自動的に解放される。"
471
472 #. type: Plain text
473 #: build/C/man3/alloca.3:63
474 msgid ""
475 "The B<alloca>()  function returns a pointer to the beginning of the "
476 "allocated space.  If the allocation causes stack overflow, program behavior "
477 "is undefined."
478 msgstr ""
479 "B<alloca>()  関数は、割り付けた領域の始まりを指すポインタを返す。 割り付けに"
480 "よってスタックオーバーフローが起った場合の プログラムの動作は定義されていな"
481 "い。"
482
483 #. type: Plain text
484 #: build/C/man3/alloca.3:65
485 msgid "This function is not in POSIX.1-2001."
486 msgstr "この関数は POSIX.1-2001 にはない。"
487
488 #. type: Plain text
489 #: build/C/man3/alloca.3:71
490 msgid ""
491 "There is evidence that the B<alloca>()  function appeared in 32V, PWB, "
492 "PWB.2, 3BSD, and 4BSD.  There is a man page for it in 4.3BSD.  Linux uses "
493 "the GNU version."
494 msgstr ""
495 "32V, PWB, PWB.2, 3BSD, 4BSD に B<alloca>()  関数が登場した証拠がある。 "
496 "4.3BSD には、マニュアルページがある。 Linux は、GNU 版を使っている。 この関数"
497 "は POSIX.1-2001 にはない。"
498
499 #. type: Plain text
500 #: build/C/man3/alloca.3:86
501 msgid ""
502 "The B<alloca>()  function is machine- and compiler-dependent.  For certain "
503 "applications, its use can improve efficiency compared to the use of B<malloc>"
504 "(3)  plus B<free>(3).  In certain cases, it can also simplify memory "
505 "deallocation in applications that use B<longjmp>(3)  or B<siglongjmp>(3).  "
506 "Otherwise, its use is discouraged."
507 msgstr ""
508 "B<alloca>()  関数は、機種とコンパイラに依存する。 特定のアプリケーションで"
509 "は、この関数を使うと B<malloc>(3)  と B<free>(3)  を組み合わせて使った場合に"
510 "比べて効率を改善することができる。 特定の場合では、この関数を使うことで、 "
511 "B<longjmp>(3)  や B<siglongjmp>(3)  を使うアプリケーションでのメモリの開放を"
512 "簡単にすることができる。 それ以外の場合では、この関数の使用は推奨されない。"
513
514 #. type: Plain text
515 #: build/C/man3/alloca.3:95
516 msgid ""
517 "Because the space allocated by B<alloca>()  is allocated within the stack "
518 "frame, that space is automatically freed if the function return is jumped "
519 "over by a call to B<longjmp>(3)  or B<siglongjmp>(3)."
520 msgstr ""
521 "B<alloca>()  により割り当てられる空間はスタックフレームから割り当てらるの"
522 "で、 関数の戻り先が B<longjmp>(3)  や B<siglongjmp>(3)  の呼び出しによりジャ"
523 "ンプした場合には、 割り当てられた空間は自動的に解放される。"
524
525 #. type: Plain text
526 #: build/C/man3/alloca.3:100
527 msgid "Do not attempt to B<free>(3)  space allocated by B<alloca>()!"
528 msgstr ""
529 "B<alloca>()  で割り当てられた空間を B<free>(3)  しようとすることのないよう"
530 "に!"
531
532 #. type: SS
533 #: build/C/man3/alloca.3:100
534 #, no-wrap
535 msgid "Notes on the GNU Version"
536 msgstr "GNU 版についての注意"
537
538 #. type: Plain text
539 #: build/C/man3/alloca.3:122
540 msgid ""
541 "Normally, B<gcc>(1)  translates calls to B<alloca>()  with inlined code.  "
542 "This is not done when either the I<-ansi>, I<-std=c89>, I<-std=c99>, or the "
543 "I<-fno-builtin> option is given (and the header I<E<lt>alloca.hE<gt>> is not "
544 "included).  But beware! By default the glibc version of I<E<lt>stdlib."
545 "hE<gt>> includes I<E<lt>alloca.hE<gt>> and that contains the line:"
546 msgstr ""
547 "通常 B<gcc>(1)  は B<alloca>()  の呼び出しをインラインコードに変換する。 I<-"
548 "ansi>, I<-std=c89>, I<-std=c99>, I<-fno-builtin> のいずれかのオプションが指定"
549 "された場合、この変換は行われない (また I<E<lt>alloca.hE<gt>> のインクルードも"
550 "行われない)。 だだし、デフォルトでは glibc 版の I<E<lt>stdlib.hE<gt>> は "
551 "I<E<lt>alloca.hE<gt>> をインクルードしており、これには以下の行が含まれている"
552 "ので注意すること。"
553
554 #. type: Plain text
555 #: build/C/man3/alloca.3:125
556 #, no-wrap
557 msgid "    #define alloca(size)   __builtin_alloca (size)\n"
558 msgstr "    #define alloca(size)   __builtin_alloca (size)\n"
559
560 #. type: Plain text
561 #: build/C/man3/alloca.3:128
562 msgid "with messy consequences if one has a private version of this function."
563 msgstr "独自版の __builtin_alloca (size) 関数があると厄介な結果になる。"
564
565 #. type: Plain text
566 #: build/C/man3/alloca.3:132
567 msgid ""
568 "The fact that the code is inlined means that it is impossible to take the "
569 "address of this function, or to change its behavior by linking with a "
570 "different library."
571 msgstr ""
572 "このコードはインライン化されているので、 この関数のアドレスを取得したり、 他"
573 "のライブラリをリンクして動作を変更することはできない。"
574
575 #. type: Plain text
576 #: build/C/man3/alloca.3:136
577 msgid ""
578 "The inlined code often consists of a single instruction adjusting the stack "
579 "pointer, and does not check for stack overflow.  Thus, there is no NULL "
580 "error return."
581 msgstr ""
582 "通常このインラインコードはスタックポインタを移動する 1 つの命令 "
583 "(instruction) から構成されており、 スタックオーバーフローをチェックしない。 "
584 "よって NULL エラーが返されることはない。"
585
586 #. type: SH
587 #: build/C/man3/alloca.3:136 build/C/man2/cacheflush.2:81
588 #: build/C/man3/mallopt.3:404 build/C/man2/mlock.2:305 build/C/man2/mmap.2:544
589 #: build/C/man3/mtrace.3:100 build/C/man2/posix_fadvise.2:177
590 #: build/C/man2/shmget.2:284
591 #, no-wrap
592 msgid "BUGS"
593 msgstr "バグ"
594
595 #. type: Plain text
596 #: build/C/man3/alloca.3:141
597 msgid ""
598 "There is no error indication if the stack frame cannot be extended.  "
599 "(However, after a failed allocation, the program is likely to receive a "
600 "B<SIGSEGV> signal if it attempts to access the unallocated space.)"
601 msgstr ""
602 "スタックフレームが拡張できなかった場合、エラー通知は行われない。 (しかしなが"
603 "ら、割り当てに失敗した後で、プログラムが割り当てられなかった 空間にアクセスし"
604 "ようとした場合に B<SIGSEGV> シグナルを受信することだろう。)"
605
606 #. type: Plain text
607 #: build/C/man3/alloca.3:149
608 msgid ""
609 "On many systems B<alloca>()  cannot be used inside the list of arguments of "
610 "a function call, because the stack space reserved by B<alloca>()  would "
611 "appear on the stack in the middle of the space for the function arguments."
612 msgstr ""
613 "多くのシステムにおいて、関数コールの引き数のリスト内では B<alloca>()  が使え"
614 "ない。 これは、 B<alloca>()  によって予約されるスタック領域が、 関数引き数に"
615 "使われるスタック領域の中に現れてしまうためである。"
616
617 #. type: SH
618 #: build/C/man3/alloca.3:149 build/C/man2/fallocate.2:191
619 #: build/C/man2/madvise.2:353 build/C/man3/malloc_hook.3:133
620 #: build/C/man3/mallopt.3:568 build/C/man2/mlock.2:330 build/C/man2/mmap.2:653
621 #: build/C/man2/mmap2.2:92 build/C/man2/mprotect.2:220
622 #: build/C/man2/mremap.2:200 build/C/man2/msync.2:118
623 #: build/C/man3/mtrace.3:165 build/C/man2/posix_fadvise.2:182
624 #: build/C/man3/posix_fallocate.3:126 build/C/man3/posix_memalign.3:270
625 #: build/C/man2/readahead.2:92 build/C/man2/remap_file_pages.2:155
626 #: build/C/man3/shm_open.3:269 build/C/man7/shm_overview.7:114
627 #: build/C/man2/shmctl.2:403 build/C/man2/shmget.2:290
628 #: build/C/man2/shmop.2:282 build/C/man2/subpage_prot.2:120
629 #: build/C/man2/sync_file_range.2:217 build/C/man3/malloc_get_state.3:109
630 #: build/C/man3/malloc_trim.3:76 build/C/man3/malloc_usable_size.3:60
631 #: build/C/man3/mcheck.3:204
632 #, no-wrap
633 msgid "SEE ALSO"
634 msgstr "関連項目"
635
636 #. type: Plain text
637 #: build/C/man3/alloca.3:153
638 msgid "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
639 msgstr "B<brk>(2), B<longjmp>(3), B<malloc>(3)"
640
641 #. type: TH
642 #: build/C/man2/cacheflush.2:24
643 #, no-wrap
644 msgid "CACHEFLUSH"
645 msgstr "CACHEFLUSH"
646
647 #. type: TH
648 #: build/C/man2/cacheflush.2:24
649 #, no-wrap
650 msgid "2007-05-26"
651 msgstr "2007-05-26"
652
653 #. type: Plain text
654 #: build/C/man2/cacheflush.2:27
655 msgid "cacheflush - flush contents of instruction and/or data cache"
656 msgstr "cacheflush - 命令キャッシュやデータキャッシュの内容をフラッシュする"
657
658 #. type: Plain text
659 #: build/C/man2/cacheflush.2:30
660 #, no-wrap
661 msgid "B<#include E<lt>asm/cachectl.hE<gt>>\n"
662 msgstr "B<#include E<lt>asm/cachectl.hE<gt>>\n"
663
664 #. type: Plain text
665 #: build/C/man2/cacheflush.2:32
666 #, no-wrap
667 msgid "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
668 msgstr "B<int cacheflush(char *>I<addr>B<, int >I<nbytes>B<, int >I<cache>B<);>\n"
669
670 #. type: Plain text
671 #: build/C/man2/cacheflush.2:42
672 msgid ""
673 "B<cacheflush>()  flushes the contents of the indicated cache(s) for the user "
674 "addresses in the range I<addr> to I<(addr+nbytes-1)>.  I<cache> may be one "
675 "of:"
676 msgstr ""
677 "B<cacheflush>()  は I<addr> から I<(addr+nbytes-1)> の範囲のユーザアドレスに"
678 "対応する 指定されたキャッシュをフラッシュする。 I<cache> には以下のいずれかを"
679 "指定する:"
680
681 #. type: TP
682 #: build/C/man2/cacheflush.2:42
683 #, no-wrap
684 msgid "B<ICACHE>"
685 msgstr "B<ICACHE>"
686
687 #. type: Plain text
688 #: build/C/man2/cacheflush.2:45
689 msgid "Flush the instruction cache."
690 msgstr "命令 (instruction) キャッシュをフラッシュする。"
691
692 #. type: TP
693 #: build/C/man2/cacheflush.2:45
694 #, no-wrap
695 msgid "B<DCACHE>"
696 msgstr "B<DCACHE>"
697
698 #. type: Plain text
699 #: build/C/man2/cacheflush.2:48
700 msgid "Write back to memory and invalidate the affected valid cache lines."
701 msgstr "変更があったキャッシュラインをメモリに書き戻し、無効にする。"
702
703 #. type: TP
704 #: build/C/man2/cacheflush.2:48
705 #, no-wrap
706 msgid "B<BCACHE>"
707 msgstr "B<BCACHE>"
708
709 #. type: Plain text
710 #: build/C/man2/cacheflush.2:52
711 msgid "Same as B<(ICACHE|DCACHE)>."
712 msgstr "B<(ICACHE|DCACHE)> と同じ。"
713
714 #. type: Plain text
715 #: build/C/man2/cacheflush.2:58
716 msgid ""
717 "B<cacheflush>()  returns 0 on success or -1 on error.  If errors are "
718 "detected, I<errno> will indicate the error."
719 msgstr ""
720 "B<cacheflush>()  は成功した場合は 0 を、失敗した場合は -1 を返す。エラーが検"
721 "出された場合は I<errno> にエラーが指示される。"
722
723 #. type: TP
724 #: build/C/man2/cacheflush.2:59 build/C/man2/mmap2.2:62
725 #: build/C/man2/mremap.2:143 build/C/man2/shmctl.2:303
726 #: build/C/man2/subpage_prot.2:67
727 #, no-wrap
728 msgid "B<EFAULT>"
729 msgstr "B<EFAULT>"
730
731 #. type: Plain text
732 #: build/C/man2/cacheflush.2:66
733 msgid ""
734 "Some or all of the address range I<addr> to I<(addr+nbytes-1)> is not "
735 "accessible."
736 msgstr ""
737 "I<addr> から I<(addr+nbytes-1)> の範囲のアドレスの全てまたは一部が アクセス可"
738 "能ではない。"
739
740 #. type: TP
741 #: build/C/man2/cacheflush.2:66 build/C/man2/fallocate.2:124
742 #: build/C/man2/madvise.2:264 build/C/man2/mlock.2:158
743 #: build/C/man2/mlock.2:165 build/C/man2/mlock.2:177 build/C/man2/mmap.2:421
744 #: build/C/man2/mmap.2:429 build/C/man2/mmap.2:434 build/C/man2/mmap2.2:65
745 #: build/C/man2/mprotect.2:89 build/C/man2/mremap.2:152
746 #: build/C/man2/msync.2:80 build/C/man2/posix_fadvise.2:93
747 #: build/C/man3/posix_fallocate.3:79 build/C/man3/posix_memalign.3:156
748 #: build/C/man2/readahead.2:76 build/C/man2/remap_file_pages.2:130
749 #: build/C/man2/remap_file_pages.2:137 build/C/man3/shm_open.3:211
750 #: build/C/man2/shmctl.2:317 build/C/man2/shmget.2:196
751 #: build/C/man2/shmop.2:195 build/C/man2/shmop.2:218
752 #: build/C/man2/subpage_prot.2:72 build/C/man2/sync_file_range.2:152
753 #, no-wrap
754 msgid "B<EINVAL>"
755 msgstr "B<EINVAL>"
756
757 #. type: Plain text
758 #: build/C/man2/cacheflush.2:74
759 msgid "I<cache> is not one of B<ICACHE>, B<DCACHE>, or B<BCACHE>."
760 msgstr "I<cache> パラメータが B<ICACHE>, B<DCACHE>, B<BCACHE> のどれでもない。"
761
762 #.  FIXME This system call was only on MIPS back in 1.2 days, but
763 #.  by now it is on a number of other architectures (but not i386).
764 #.  Investigate the details and update this page.
765 #.  Irix 6.5 appears to have a cacheflush() syscall -- mtk
766 #. type: Plain text
767 #: build/C/man2/cacheflush.2:81
768 msgid ""
769 "This Linux-specific system call is only available on MIPS-based systems.  It "
770 "should not be used in programs intended to be portable."
771 msgstr ""
772 "この Linux 特有のシステムコールは MIPS ベースのシステムでのみ有効である。 移"
773 "植を意図したプログラムで使用すべきではない。"
774
775 #. type: Plain text
776 #: build/C/man2/cacheflush.2:88
777 msgid ""
778 "The current implementation ignores the I<addr> and I<nbytes> arguments.  "
779 "Therefore, the whole cache is always flushed."
780 msgstr ""
781 "現在の実装では、引き数 I<addr> と I<nbytes> は無視される。そのため、 常に全て"
782 "のキャッシュがフラッシュされる。"
783
784 #. type: TH
785 #: build/C/man2/fallocate.2:8
786 #, no-wrap
787 msgid "FALLOCATE"
788 msgstr "FALLOCATE"
789
790 #. type: TH
791 #: build/C/man2/fallocate.2:8
792 #, no-wrap
793 msgid "2012-04-23"
794 msgstr "2012-04-23"
795
796 #. type: Plain text
797 #: build/C/man2/fallocate.2:11
798 msgid "fallocate - manipulate file space"
799 msgstr "fallocate - ファイル空間の操作"
800
801 #. type: Plain text
802 #: build/C/man2/fallocate.2:15 build/C/man2/readahead.2:35
803 #, no-wrap
804 msgid ""
805 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
806 "B<#include E<lt>fcntl.hE<gt>>\n"
807 msgstr ""
808 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
809 "B<#include E<lt>fcntl.hE<gt>>\n"
810
811 #. type: Plain text
812 #: build/C/man2/fallocate.2:18
813 #, no-wrap
814 msgid "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
815 msgstr "B<int fallocate(int >I<fd>B<, int >I<mode>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
816
817 #. type: Plain text
818 #: build/C/man2/fallocate.2:24
819 msgid ""
820 "This is a nonportable, Linux-specific system call.  For the portable, "
821 "POSIX.1-specified method of ensuring that space is allocated for a file, see "
822 "B<posix_fallocate>(3)."
823 msgstr ""
824 "このシステムコールは、移植性のない、Linux 固有のシステムコールである。 移植性"
825 "が必要な場合は、ファイルに対してディスク空間を確実に確保するために、 POSIX.1 "
826 "で規定された方法である B<posix_fallocate>(3)  を使うこと。"
827
828 #. type: Plain text
829 #: build/C/man2/fallocate.2:34
830 msgid ""
831 "B<fallocate>()  allows the caller to directly manipulate the allocated disk "
832 "space for the file referred to by I<fd> for the byte range starting at "
833 "I<offset> and continuing for I<len> bytes."
834 msgstr ""
835 "B<fallocate>()  を使うと、 I<fd> が参照するファイルに割り当てられたディスク空"
836 "間を直接操作できる。 操作対象は、 I<offset> から始まる長さ I<len> バイトの領"
837 "域である。"
838
839 #. type: Plain text
840 #: build/C/man2/fallocate.2:39
841 msgid ""
842 "The I<mode> argument determines the operation to be performed on the given "
843 "range.  Details of the supported operations are given in the subsections "
844 "below."
845 msgstr ""
846 "I<mode> 引き数は、指定された領域に対して実行する操作を指定する。\n"
847 "サポートされている操作の詳細は以下のサブセクションで説明する。"
848
849 #. type: SS
850 #: build/C/man2/fallocate.2:39
851 #, no-wrap
852 msgid "Allocating disk space"
853 msgstr "ディスク領域の割り当て"
854
855 #. type: Plain text
856 #: build/C/man2/fallocate.2:58
857 msgid ""
858 "The default operation (i.e., I<mode> is zero) of B<fallocate>()  allocates "
859 "and initializes to zero the disk space within the range specified by "
860 "I<offset> and I<len>.  The file size (as reported by B<stat>(2))  will be "
861 "changed if I<offset>+I<len> is greater than the file size.  This default "
862 "behavior closely resembles the behavior of the B<posix_fallocate>(3)  "
863 "library function, and is intended as a method of optimally implementing that "
864 "function."
865 msgstr ""
866 "B<fallocate>() のデフォルトの動作 (つまり I<mode> が 0 の場合) は、\n"
867 "I<offset> と I<len> で指定された範囲のディスク領域の割り当てと初期化を行"
868 "う。\n"
869 "I<offset>+I<len> がファイルサイズよりも大きかった場合、\n"
870 "(B<stat>(2) で報告される) ファイルサイズが変更される。このデフォルトの動作"
871 "は、\n"
872 "ライブラリ関数 B<posix_fallocate>(3) の動作と非常に似ている。これは、\n"
873 "このシステムコールが B<posix_fallocate>(3) を最適に実装する手段を提供する\n"
874 "ことを目的としているからである。"
875
876 #. type: Plain text
877 #: build/C/man2/fallocate.2:64
878 msgid ""
879 "After a successful call, subsequent writes into the range specified by "
880 "I<offset> and I<len> are guaranteed not to fail because of lack of disk "
881 "space."
882 msgstr ""
883
884 #. type: Plain text
885 #: build/C/man2/fallocate.2:75
886 msgid ""
887 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
888 "the call is similar, but the file size will not be changed even if I<offset>"
889 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
890 "the end of the file in this manner is useful for optimizing append workloads."
891 msgstr ""
892 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
893 "ル\n"
894 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
895 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
896 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
897 "追記を最適化したい場合に役に立つ。"
898
899 #. type: Plain text
900 #: build/C/man2/fallocate.2:79
901 msgid ""
902 "Because allocation is done in block size chunks, B<fallocate>()  may "
903 "allocate a larger range of disk space than was specified."
904 msgstr ""
905 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
906 "り\n"
907 "も大きなディスク領域を割り当てることがある。"
908
909 #. type: SS
910 #: build/C/man2/fallocate.2:79
911 #, no-wrap
912 msgid "Deallocating file space"
913 msgstr "ファイル空間の割り当て解除"
914
915 #. type: Plain text
916 #: build/C/man2/fallocate.2:94
917 msgid ""
918 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
919 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
920 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
921 "range, partial file system blocks are zeroed, and whole file system blocks "
922 "are removed from the file.  After a successful call, subsequent reads from "
923 "this range will return zeroes."
924 msgstr ""
925
926 #. type: Plain text
927 #: build/C/man2/fallocate.2:105
928 msgid ""
929 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
930 "I<mode>; in other words, even when punching off the end of the file, the "
931 "file size (as reported by B<stat>(2))  does not change."
932 msgstr ""
933
934 #. type: Plain text
935 #: build/C/man2/fallocate.2:109
936 msgid ""
937 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
938 "doesn't support the operation, an error is returned."
939 msgstr ""
940
941 #. type: Plain text
942 #: build/C/man2/fallocate.2:112
943 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
944 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
945
946 #. type: TP
947 #: build/C/man2/fallocate.2:113 build/C/man2/madvise.2:261
948 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:90
949 #: build/C/man3/posix_fallocate.3:71 build/C/man2/readahead.2:72
950 #: build/C/man2/sync_file_range.2:148
951 #, no-wrap
952 msgid "B<EBADF>"
953 msgstr "B<EBADF>"
954
955 #. type: Plain text
956 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
957 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
958 msgstr ""
959 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
960 "いない。"
961
962 #. type: TP
963 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
964 #, no-wrap
965 msgid "B<EFBIG>"
966 msgstr "B<EFBIG>"
967
968 #. type: Plain text
969 #: build/C/man2/fallocate.2:121
970 msgid "I<offset>+I<len> exceeds the maximum file size."
971 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
972
973 #. type: TP
974 #: build/C/man2/fallocate.2:121
975 #, no-wrap
976 msgid "B<EINTR>"
977 msgstr "B<EINTR>"
978
979 #. type: Plain text
980 #: build/C/man2/fallocate.2:124
981 msgid "A signal was caught during execution."
982 msgstr "実行中にシグナルが捕捉された。"
983
984 #. type: Plain text
985 #: build/C/man2/fallocate.2:136 build/C/man3/posix_fallocate.3:85
986 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
987 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
988
989 #. type: TP
990 #: build/C/man2/fallocate.2:136 build/C/man2/madvise.2:292
991 #: build/C/man2/sync_file_range.2:160
992 #, no-wrap
993 msgid "B<EIO>"
994 msgstr "B<EIO>"
995
996 #. type: Plain text
997 #: build/C/man2/fallocate.2:139
998 msgid "An I/O error occurred while reading from or writing to a file system."
999 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1000
1001 #. type: TP
1002 #: build/C/man2/fallocate.2:139 build/C/man2/mmap.2:450
1003 #: build/C/man3/posix_fallocate.3:85
1004 #, no-wrap
1005 msgid "B<ENODEV>"
1006 msgstr "B<ENODEV>"
1007
1008 #. type: Plain text
1009 #: build/C/man2/fallocate.2:146
1010 msgid ""
1011 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1012 "or FIFO, a different error results.)"
1013 msgstr ""
1014 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1015 "を参照している場合、別のエラーが発生する)。"
1016
1017 #. type: TP
1018 #: build/C/man2/fallocate.2:146 build/C/man3/posix_fallocate.3:89
1019 #: build/C/man2/shmget.2:214 build/C/man2/sync_file_range.2:166
1020 #, no-wrap
1021 msgid "B<ENOSPC>"
1022 msgstr "B<ENOSPC>"
1023
1024 #. type: Plain text
1025 #: build/C/man2/fallocate.2:151 build/C/man3/posix_fallocate.3:94
1026 msgid ""
1027 "There is not enough space left on the device containing the file referred to "
1028 "by I<fd>."
1029 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1030
1031 #. type: Plain text
1032 #: build/C/man2/fallocate.2:155
1033 msgid "This kernel does not implement B<fallocate>()."
1034 msgstr ""
1035
1036 #. type: TP
1037 #: build/C/man2/fallocate.2:155
1038 #, no-wrap
1039 msgid "B<EOPNOTSUPP>"
1040 msgstr "B<EOPNOTSUPP>"
1041
1042 #. type: Plain text
1043 #: build/C/man2/fallocate.2:164
1044 msgid ""
1045 "The file system containing the file referred to by I<fd> does not support "
1046 "this operation; or the I<mode> is not supported by the file system "
1047 "containing the file referred to by I<fd>."
1048 msgstr ""
1049 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1050 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1051 "I<mode> をサポートしていない。"
1052
1053 #. type: TP
1054 #: build/C/man2/fallocate.2:164 build/C/man2/mlock.2:144
1055 #: build/C/man2/mlock.2:183 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:342
1056 #: build/C/man2/shmget.2:222
1057 #, no-wrap
1058 msgid "B<EPERM>"
1059 msgstr "B<EPERM>"
1060
1061 #. type: Plain text
1062 #: build/C/man2/fallocate.2:180
1063 msgid ""
1064 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1065 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1066 "is marked append-only (see B<chattr>(1))."
1067 msgstr ""
1068
1069 #. type: TP
1070 #: build/C/man2/fallocate.2:180 build/C/man2/posix_fadvise.2:96
1071 #: build/C/man3/posix_fallocate.3:94 build/C/man2/sync_file_range.2:169
1072 #, no-wrap
1073 msgid "B<ESPIPE>"
1074 msgstr "B<ESPIPE>"
1075
1076 #. type: Plain text
1077 #: build/C/man2/fallocate.2:184
1078 msgid "I<fd> refers to a pipe or FIFO."
1079 msgstr "I<fd> がパイプか FIFO を参照している。"
1080
1081 #. type: SH
1082 #: build/C/man2/fallocate.2:184 build/C/man2/mmap2.2:74
1083 #: build/C/man2/posix_fadvise.2:103 build/C/man3/posix_fallocate.3:98
1084 #: build/C/man3/posix_memalign.3:165 build/C/man2/readahead.2:82
1085 #: build/C/man2/remap_file_pages.2:146 build/C/man3/shm_open.3:247
1086 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:177
1087 #: build/C/man3/mcheck.3:133
1088 #, no-wrap
1089 msgid "VERSIONS"
1090 msgstr "バージョン"
1091
1092 #. type: Plain text
1093 #: build/C/man2/fallocate.2:188
1094 msgid ""
1095 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1096 "provided by glibc since version 2.10."
1097 msgstr ""
1098 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1099 "対応はバージョン 3.10 以降で行われている。"
1100
1101 #. type: Plain text
1102 #: build/C/man2/fallocate.2:191
1103 msgid "B<fallocate>()  is Linux-specific."
1104 msgstr "B<fallocate>()  は Linux 固有である。"
1105
1106 #. type: Plain text
1107 #: build/C/man2/fallocate.2:195
1108 msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1109 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1110
1111 #. type: TH
1112 #: build/C/man2/madvise.2:35
1113 #, no-wrap
1114 msgid "MADVISE"
1115 msgstr "MADVISE"
1116
1117 #. type: TH
1118 #: build/C/man2/madvise.2:35
1119 #, no-wrap
1120 msgid "2011-09-18"
1121 msgstr "2011-09-18"
1122
1123 #. type: Plain text
1124 #: build/C/man2/madvise.2:38
1125 msgid "madvise - give advice about use of memory"
1126 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1127
1128 #. type: Plain text
1129 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1130 #: build/C/man3/shm_open.3:31
1131 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1132 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1133
1134 #. type: Plain text
1135 #: build/C/man2/madvise.2:42
1136 msgid ""
1137 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1138 msgstr ""
1139 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1140
1141 #. type: Plain text
1142 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:42
1143 #: build/C/man3/posix_fallocate.3:37 build/C/man3/posix_memalign.3:48
1144 msgid ""
1145 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1146 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1147
1148 #. type: Plain text
1149 #: build/C/man2/madvise.2:50
1150 msgid "B<madvise>(): _BSD_SOURCE"
1151 msgstr "B<madvise>(): _BSD_SOURCE"
1152
1153 #. type: Plain text
1154 #: build/C/man2/madvise.2:68
1155 msgid ""
1156 "The B<madvise>()  system call advises the kernel about how to handle paging "
1157 "input/output in the address range beginning at address I<addr> and with size "
1158 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1159 "to use some mapped or shared memory areas, so that the kernel can choose "
1160 "appropriate read-ahead and caching techniques.  This call does not influence "
1161 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1162 "but may influence its performance.  The kernel is free to ignore the advice."
1163 msgstr ""
1164 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1165 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1166 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1167 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1168 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1169 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1170 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1171
1172 #. type: Plain text
1173 #: build/C/man2/madvise.2:72
1174 msgid "The advice is indicated in the I<advice> argument which can be"
1175 msgstr ""
1176 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1177
1178 #. type: TP
1179 #: build/C/man2/madvise.2:72
1180 #, no-wrap
1181 msgid "B<MADV_NORMAL>"
1182 msgstr "B<MADV_NORMAL>"
1183
1184 #. type: Plain text
1185 #: build/C/man2/madvise.2:76
1186 msgid "No special treatment.  This is the default."
1187 msgstr "特別な扱いは行わない。これがデフォルトである。"
1188
1189 #. type: TP
1190 #: build/C/man2/madvise.2:76
1191 #, no-wrap
1192 msgid "B<MADV_RANDOM>"
1193 msgstr "B<MADV_RANDOM>"
1194
1195 #. type: Plain text
1196 #: build/C/man2/madvise.2:80
1197 msgid ""
1198 "Expect page references in random order.  (Hence, read ahead may be less "
1199 "useful than normally.)"
1200 msgstr ""
1201 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1202 "なさそうだ。)"
1203
1204 #. type: TP
1205 #: build/C/man2/madvise.2:80
1206 #, no-wrap
1207 msgid "B<MADV_SEQUENTIAL>"
1208 msgstr "B<MADV_SEQUENTIAL>"
1209
1210 #. type: Plain text
1211 #: build/C/man2/madvise.2:85
1212 msgid ""
1213 "Expect page references in sequential order.  (Hence, pages in the given "
1214 "range can be aggressively read ahead, and may be freed soon after they are "
1215 "accessed.)"
1216 msgstr ""
1217 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1218 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1219 "して良い。)"
1220
1221 #. type: TP
1222 #: build/C/man2/madvise.2:85
1223 #, no-wrap
1224 msgid "B<MADV_WILLNEED>"
1225 msgstr "B<MADV_WILLNEED>"
1226
1227 #. type: Plain text
1228 #: build/C/man2/madvise.2:89
1229 msgid ""
1230 "Expect access in the near future.  (Hence, it might be a good idea to read "
1231 "some pages ahead.)"
1232 msgstr ""
1233 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1234 "ておくといいだろう。)"
1235
1236 #. type: TP
1237 #: build/C/man2/madvise.2:89
1238 #, no-wrap
1239 msgid "B<MADV_DONTNEED>"
1240 msgstr "B<MADV_DONTNEED>"
1241
1242 #. type: Plain text
1243 #: build/C/man2/madvise.2:100
1244 msgid ""
1245 "Do not expect access in the near future.  (For the time being, the "
1246 "application is finished with the given range, so the kernel can free "
1247 "resources associated with it.)  Subsequent accesses of pages in this range "
1248 "will succeed, but will result either in reloading of the memory contents "
1249 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1250 "pages for mappings without an underlying file."
1251 msgstr ""
1252 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1253 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1254 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1255 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1256 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1257 "なる。"
1258
1259 #. type: TP
1260 #: build/C/man2/madvise.2:100
1261 #, no-wrap
1262 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1263 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1264
1265 #.  2.6.18-rc5
1266 #.  Databases want to use this feature to drop a section of their
1267 #.  bufferpool (shared memory segments) - without writing back to
1268 #.  disk/swap space.  This feature is also useful for supporting
1269 #.  hot-plug memory on UML.
1270 #. type: Plain text
1271 #: build/C/man2/madvise.2:113
1272 msgid ""
1273 "Free up a given range of pages and its associated backing store.  Currently, "
1274 "only shmfs/tmpfs supports this; other file systems return with the error "
1275 "B<ENOSYS>."
1276 msgstr ""
1277 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1278 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1279 "返される。"
1280
1281 #. type: TP
1282 #: build/C/man2/madvise.2:113
1283 #, no-wrap
1284 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1285 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1286
1287 #.  See http://lwn.net/Articles/171941/
1288 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1289 #.  Currently, copy-on-write may change the physical address of
1290 #.  a page even if the user requested that the page is pinned in
1291 #.  memory (either by mlock or by get_user_pages).  This happens
1292 #.  if the process forks meanwhile, and the parent writes to that
1293 #.  page.  As a result, the page is orphaned: in case of
1294 #.  get_user_pages, the application will never see any data hardware
1295 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1296 #.  the parent is not getting the realtime/security benefits of mlock.
1297 #.  In particular, this affects the Infiniband modules which do DMA from
1298 #.  and into user pages all the time.
1299 #.  This patch adds madvise options to control whether memory range is
1300 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1301 #.  from/into these pages.  Could also be useful to an application
1302 #.  wanting to speed up its forks by cutting large areas out of
1303 #.  consideration.
1304 #.  SEE ALSO: http://lwn.net/Articles/171941/
1305 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1306 #. type: Plain text
1307 #: build/C/man2/madvise.2:144
1308 msgid ""
1309 "Do not make the pages in this range available to the child after a B<fork>"
1310 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1311 "physical location of a page(s) if the parent writes to it after a B<fork>"
1312 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1313 "page(s).)"
1314 msgstr ""
1315 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1316 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1317 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1318 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1319 "を行うような場合に 問題を起こすことがある)。"
1320
1321 #. type: TP
1322 #: build/C/man2/madvise.2:144
1323 #, no-wrap
1324 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1325 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1326
1327 #. type: Plain text
1328 #: build/C/man2/madvise.2:150
1329 msgid ""
1330 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1331 "a mapping is inherited across B<fork>(2)."
1332 msgstr ""
1333 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1334 "(2)  の前後でマッピングは継承されるようになる。"
1335
1336 #. type: TP
1337 #: build/C/man2/madvise.2:150
1338 #, no-wrap
1339 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1340 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1341
1342 #. type: Plain text
1343 #: build/C/man2/madvise.2:162
1344 msgid ""
1345 "Poison a page and handle it like a hardware memory corruption.  This "
1346 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1347 "This operation may result in the calling process receiving a B<SIGBUS> and "
1348 "the page being unmapped.  This feature is intended for testing of memory "
1349 "error-handling code; it is only available if the kernel was configured with "
1350 "B<CONFIG_MEMORY_FAILURE>."
1351 msgstr ""
1352
1353 #. type: TP
1354 #: build/C/man2/madvise.2:162
1355 #, no-wrap
1356 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1357 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1358
1359 #. type: Plain text
1360 #: build/C/man2/madvise.2:180
1361 msgid ""
1362 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1363 "memory of each page in the specified range is preserved (i.e., when next "
1364 "accessed, the same content will be visible, but in a new physical page "
1365 "frame), and the original page is offlined (i.e., no longer used, and taken "
1366 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1367 "operation is invisible to (i.e., does not change the semantics of)  the "
1368 "calling process.  This feature is intended for testing of memory error-"
1369 "handling code; it is only available if the kernel was configured with "
1370 "B<CONFIG_MEMORY_FAILURE>."
1371 msgstr ""
1372
1373 #. type: TP
1374 #: build/C/man2/madvise.2:180
1375 #, no-wrap
1376 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1377 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1378
1379 #. type: Plain text
1380 #: build/C/man2/madvise.2:205
1381 msgid ""
1382 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1383 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1384 "memory that have been marked as mergeable, looking for pages with identical "
1385 "content.  These are replaced by a single write-protected page (which is "
1386 "automatically copied if a process later wants to update the content of the "
1387 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1388 "feature is intended for applications that generate many instances of the "
1389 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1390 "of processing power; use with care.  See the kernel source file "
1391 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1392 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1393 "configured with B<CONFIG_KSM>."
1394 msgstr ""
1395
1396 #. type: TP
1397 #: build/C/man2/madvise.2:205
1398 #, no-wrap
1399 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1400 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1401
1402 #. type: Plain text
1403 #: build/C/man2/madvise.2:214
1404 msgid ""
1405 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1406 "address range; KSM unmerges whatever pages it had merged in the address "
1407 "range specified by I<addr> and I<length>."
1408 msgstr ""
1409
1410 #. type: TP
1411 #: build/C/man2/madvise.2:214
1412 #, no-wrap
1413 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1414 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1415
1416 #.  http://lwn.net/Articles/358904/
1417 #.  https://lwn.net/Articles/423584/
1418 #. type: Plain text
1419 #: build/C/man2/madvise.2:243
1420 msgid ""
1421 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1422 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1423 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1424 "the areas marked as huge page candidates to replace them with huge pages.  "
1425 "The kernel will also allocate huge pages directly when the region is "
1426 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1427 "feature is primarily aimed at applications that use large mappings of data "
1428 "and access large regions of that memory at a time (e.g. virtualization "
1429 "systems such as QEMU).  It can very easily waste memory (e.g. a 2MB mapping "
1430 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1431 "one 4KB page).  See the kernel source file I<Documentation/vm/transhuge.txt> "
1432 "for more details.  The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations "
1433 "are only available if the kernel was configured with "
1434 "B<CONFIG_TRANSPARENT_HUGEPAGE>."
1435 msgstr ""
1436
1437 #. type: TP
1438 #: build/C/man2/madvise.2:243
1439 #, no-wrap
1440 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1441 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1442
1443 #. type: Plain text
1444 #: build/C/man2/madvise.2:250
1445 msgid ""
1446 "Ensures that memory in the address range specified by I<addr> and I<length> "
1447 "will not be collapsed into huge pages."
1448 msgstr ""
1449
1450 #. type: Plain text
1451 #: build/C/man2/madvise.2:257
1452 msgid ""
1453 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1454 "is set appropriately."
1455 msgstr ""
1456 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1457 "を適切な値に設定する。"
1458
1459 #. type: TP
1460 #: build/C/man2/madvise.2:258 build/C/man2/mlock.2:155 build/C/man2/mmap.2:411
1461 #: build/C/man2/mremap.2:137
1462 #, no-wrap
1463 msgid "B<EAGAIN>"
1464 msgstr "B<EAGAIN>"
1465
1466 #. type: Plain text
1467 #: build/C/man2/madvise.2:261
1468 msgid "A kernel resource was temporarily unavailable."
1469 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1470
1471 #. type: Plain text
1472 #: build/C/man2/madvise.2:264
1473 msgid "The map exists, but the area maps something that isn't a file."
1474 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1475
1476 #. type: Plain text
1477 #: build/C/man2/madvise.2:267
1478 msgid "This error can occur for the following reasons:"
1479 msgstr ""
1480
1481 #. type: IP
1482 #: build/C/man2/madvise.2:268 build/C/man2/madvise.2:274
1483 #: build/C/man2/madvise.2:277 build/C/man2/madvise.2:280
1484 #: build/C/man2/madvise.2:283 build/C/man3/mallopt.3:233
1485 #: build/C/man3/mallopt.3:239
1486 #, no-wrap
1487 msgid "*"
1488 msgstr ""
1489
1490 #.  .I len
1491 #.  is zero,
1492 #. type: Plain text
1493 #: build/C/man2/madvise.2:274
1494 msgid "The value I<len> is negative."
1495 msgstr "I<len> が負の値である。"
1496
1497 #. type: Plain text
1498 #: build/C/man2/madvise.2:277
1499 msgid "I<addr> is not page-aligned."
1500 msgstr ""
1501
1502 #. type: Plain text
1503 #: build/C/man2/madvise.2:280
1504 msgid "I<advice> is not a valid value"
1505 msgstr "I<advice> が有効な値でない。"
1506
1507 #. type: Plain text
1508 #: build/C/man2/madvise.2:283
1509 msgid ""
1510 "The application is attempting to release locked or shared pages (with "
1511 "B<MADV_DONTNEED>)."
1512 msgstr ""
1513 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1514 "放\n"
1515 "しようとしている。"
1516
1517 #. type: Plain text
1518 #: build/C/man2/madvise.2:291
1519 msgid ""
1520 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1521 "kernel was not configured with B<CONFIG_KSM>."
1522 msgstr ""
1523
1524 #. type: Plain text
1525 #: build/C/man2/madvise.2:298
1526 msgid ""
1527 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1528 "maximum resident set size."
1529 msgstr ""
1530 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1531 "(resident set size) の最大値を越えてしまう。"
1532
1533 #. type: TP
1534 #: build/C/man2/madvise.2:298 build/C/man2/madvise.2:303
1535 #: build/C/man2/mlock.2:124 build/C/man2/mlock.2:132 build/C/man2/mlock.2:170
1536 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:94
1537 #: build/C/man2/mprotect.2:97 build/C/man2/mremap.2:180
1538 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1539 #: build/C/man2/shmctl.2:326 build/C/man2/shmget.2:211
1540 #: build/C/man2/shmop.2:209 build/C/man2/subpage_prot.2:82
1541 #: build/C/man2/sync_file_range.2:163
1542 #, no-wrap
1543 msgid "B<ENOMEM>"
1544 msgstr "B<ENOMEM>"
1545
1546 #. type: Plain text
1547 #: build/C/man2/madvise.2:303
1548 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1549 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1550
1551 #. type: Plain text
1552 #: build/C/man2/madvise.2:307
1553 msgid ""
1554 "Addresses in the specified range are not currently mapped, or are outside "
1555 "the address space of the process."
1556 msgstr ""
1557 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1558 "空間の内部にない。"
1559
1560 #.  FIXME . Write a posix_fadvise(3) page.
1561 #. type: Plain text
1562 #: build/C/man2/madvise.2:319
1563 msgid ""
1564 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1565 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1566 "There is a similar B<posix_fadvise>(2)  for file access."
1567 msgstr ""
1568 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1569 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1570 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1571 "する。"
1572
1573 #. type: Plain text
1574 #: build/C/man2/madvise.2:328
1575 msgid ""
1576 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1577 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1578 msgstr ""
1579 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1580 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1581
1582 #. type: SS
1583 #: build/C/man2/madvise.2:329 build/C/man2/mlock.2:268
1584 #: build/C/man2/shmget.2:278
1585 #, no-wrap
1586 msgid "Linux Notes"
1587 msgstr "Linux での注意"
1588
1589 #. type: Plain text
1590 #: build/C/man2/madvise.2:337
1591 msgid ""
1592 "The current Linux implementation (2.4.0) views this system call more as a "
1593 "command than as advice and hence may return an error when it cannot do what "
1594 "it usually would do in response to this advice.  (See the ERRORS description "
1595 "above.)  This is nonstandard behavior."
1596 msgstr ""
1597 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1598 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1599 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1600 "とは異なる。"
1601
1602 #.  .SH HISTORY
1603 #.  The
1604 #.  .BR madvise ()
1605 #.  function first appeared in 4.4BSD.
1606 #. type: Plain text
1607 #: build/C/man2/madvise.2:353
1608 msgid ""
1609 "The Linux implementation requires that the address I<addr> be page-aligned, "
1610 "and allows I<length> to be zero.  If there are some parts of the specified "
1611 "address range that are not mapped, the Linux version of B<madvise>()  "
1612 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1613 "the system call, as it should)."
1614 msgstr ""
1615 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1616 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1617 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1618 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1619 "返す)。"
1620
1621 #. type: Plain text
1622 #: build/C/man2/madvise.2:360
1623 msgid ""
1624 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1625 "B<munmap>(2)"
1626 msgstr ""
1627 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1628 "B<munmap>(2)"
1629
1630 #. type: TH
1631 #: build/C/man3/malloc_hook.3:6
1632 #, no-wrap
1633 msgid "MALLOC_HOOK"
1634 msgstr "MALLOC_HOOK"
1635
1636 #. type: TH
1637 #: build/C/man3/malloc_hook.3:6
1638 #, no-wrap
1639 msgid "2010-10-13"
1640 msgstr "2010-10-13"
1641
1642 #. type: Plain text
1643 #: build/C/man3/malloc_hook.3:11
1644 msgid ""
1645 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1646 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
1647 msgstr ""
1648 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1649 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
1650
1651 #. type: Plain text
1652 #: build/C/man3/malloc_hook.3:14 build/C/man3/posix_memalign.3:40
1653 #, no-wrap
1654 msgid "B<#include E<lt>malloc.hE<gt>>\n"
1655 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
1656
1657 #. type: Plain text
1658 #: build/C/man3/malloc_hook.3:16
1659 #, no-wrap
1660 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1661 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1662
1663 #. type: Plain text
1664 #: build/C/man3/malloc_hook.3:19
1665 #, no-wrap
1666 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1667 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1668
1669 #. type: Plain text
1670 #: build/C/man3/malloc_hook.3:22
1671 #, no-wrap
1672 msgid ""
1673 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1674 "B<                         const void *>I<caller>B<);>\n"
1675 msgstr ""
1676 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1677 "B<                         const void *>I<caller>B<);>\n"
1678
1679 #. type: Plain text
1680 #: build/C/man3/malloc_hook.3:24
1681 #, no-wrap
1682 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1683 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1684
1685 #. type: Plain text
1686 #: build/C/man3/malloc_hook.3:26
1687 #, no-wrap
1688 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
1689 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
1690
1691 #. type: Plain text
1692 #: build/C/man3/malloc_hook.3:28
1693 #, no-wrap
1694 msgid "B<void (*__after_morecore_hook)(void);>\n"
1695 msgstr "B<void (*__after_morecore_hook)(void);>\n"
1696
1697 #. type: Plain text
1698 #: build/C/man3/malloc_hook.3:39
1699 msgid ""
1700 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
1701 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
1702 "these hooks to help you debug programs that use dynamic memory allocation, "
1703 "for example."
1704 msgstr ""
1705 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
1706 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
1707 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
1708 "ができる。"
1709
1710 #. type: Plain text
1711 #: build/C/man3/malloc_hook.3:46
1712 msgid ""
1713 "The variable B<__malloc_initialize_hook> points at a function that is called "
1714 "once when the malloc implementation is initialized.  This is a weak "
1715 "variable, so it can be overridden in the application with a definition like "
1716 "the following:"
1717 msgstr ""
1718 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
1719 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
1720 "ケーション内で 以下のような定義で上書きできる:"
1721
1722 #. type: Plain text
1723 #: build/C/man3/malloc_hook.3:49
1724 #, no-wrap
1725 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1726 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1727
1728 #. type: Plain text
1729 #: build/C/man3/malloc_hook.3:54
1730 msgid ""
1731 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
1732 msgstr ""
1733 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
1734
1735 #. type: Plain text
1736 #: build/C/man3/malloc_hook.3:70
1737 msgid ""
1738 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
1739 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
1740 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
1741 "except that they have a final argument I<caller> that gives the address of "
1742 "the caller of B<malloc>(3), etc."
1743 msgstr ""
1744 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
1745 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
1746 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
1747 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
1748 "出し元 (caller) のアドレスが格納される。"
1749
1750 #. type: Plain text
1751 #: build/C/man3/malloc_hook.3:76
1752 msgid ""
1753 "The variable B<__after_morecore_hook> points at a function that is called "
1754 "each time after B<sbrk>(2)  was asked for more memory."
1755 msgstr ""
1756 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
1757 "後で毎回呼び出される関数へのポインタである。"
1758
1759 #. type: Plain text
1760 #: build/C/man3/malloc_hook.3:78 build/C/man3/mtrace.3:78
1761 #: build/C/man3/malloc_get_state.3:86 build/C/man3/mcheck.3:146
1762 msgid "These functions are GNU extensions."
1763 msgstr "これらの関数は GNU による拡張である。"
1764
1765 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
1766 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
1767 #. type: Plain text
1768 #: build/C/man3/malloc_hook.3:85
1769 msgid ""
1770 "The use of these hook functions is not safe in multithreaded programs, and "
1771 "they are now deprecated.  Programmers should instead preempt calls to the "
1772 "relevant functions by defining and exporting functions such as \"malloc\" "
1773 "and \"free\"."
1774 msgstr ""
1775
1776 #. type: SH
1777 #: build/C/man3/malloc_hook.3:85 build/C/man3/mallopt.3:464
1778 #: build/C/man2/mmap.2:571 build/C/man2/mprotect.2:142
1779 #: build/C/man3/mtrace.3:106 build/C/man3/mcheck.3:159
1780 #, no-wrap
1781 msgid "EXAMPLE"
1782 msgstr "例"
1783
1784 #. type: Plain text
1785 #: build/C/man3/malloc_hook.3:87
1786 msgid "Here is a short example of how to use these variables."
1787 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
1788
1789 #. type: Plain text
1790 #: build/C/man3/malloc_hook.3:91
1791 #, no-wrap
1792 msgid ""
1793 "#include E<lt>stdio.hE<gt>\n"
1794 "#include E<lt>malloc.hE<gt>\n"
1795 msgstr ""
1796 "#include E<lt>stdio.hE<gt>\n"
1797 "#include E<lt>malloc.hE<gt>\n"
1798
1799 #. type: Plain text
1800 #: build/C/man3/malloc_hook.3:95
1801 #, no-wrap
1802 msgid ""
1803 "/* Prototypes for our hooks.  */\n"
1804 "static void my_init_hook(void);\n"
1805 "static void *my_malloc_hook(size_t, const void *);\n"
1806 msgstr ""
1807 "/* 使おうとするフックのプロトタイプ宣言 */\n"
1808 "static void my_init_hook(void);\n"
1809 "static void *my_malloc_hook(size_t, const void *);\n"
1810
1811 #. type: Plain text
1812 #: build/C/man3/malloc_hook.3:98
1813 #, no-wrap
1814 msgid ""
1815 "/* Variables to save original hooks. */\n"
1816 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1817 msgstr ""
1818 "/* 元々のフックを保存するための変数 */\n"
1819 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1820
1821 #. type: Plain text
1822 #: build/C/man3/malloc_hook.3:101
1823 #, no-wrap
1824 msgid ""
1825 "/* Override initializing hook from the C library. */\n"
1826 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1827 msgstr ""
1828 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
1829 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1830
1831 #. type: Plain text
1832 #: build/C/man3/malloc_hook.3:108
1833 #, no-wrap
1834 msgid ""
1835 "static void\n"
1836 "my_init_hook(void)\n"
1837 "{\n"
1838 "    old_malloc_hook = __malloc_hook;\n"
1839 "    __malloc_hook = my_malloc_hook;\n"
1840 "}\n"
1841 msgstr ""
1842 "static void\n"
1843 "my_init_hook(void)\n"
1844 "{\n"
1845 "    old_malloc_hook = __malloc_hook;\n"
1846 "    __malloc_hook = my_malloc_hook;\n"
1847 "}\n"
1848
1849 #. type: Plain text
1850 #: build/C/man3/malloc_hook.3:113
1851 #, no-wrap
1852 msgid ""
1853 "static void *\n"
1854 "my_malloc_hook(size_t size, const void *caller)\n"
1855 "{\n"
1856 "    void *result;\n"
1857 msgstr ""
1858 "static void *\n"
1859 "my_malloc_hook(size_t size, const void *caller)\n"
1860 "{\n"
1861 "    void *result;\n"
1862
1863 #. type: Plain text
1864 #: build/C/man3/malloc_hook.3:116
1865 #, no-wrap
1866 msgid ""
1867 "    /* Restore all old hooks */\n"
1868 "    __malloc_hook = old_malloc_hook;\n"
1869 msgstr ""
1870 "    /* 元々のフックを全て戻す */\n"
1871 "    __malloc_hook = old_malloc_hook;\n"
1872
1873 #. type: Plain text
1874 #: build/C/man3/malloc_hook.3:119
1875 #, no-wrap
1876 msgid ""
1877 "    /* Call recursively */\n"
1878 "    result = malloc(size);\n"
1879 msgstr ""
1880 "    /* malloc の再帰的呼び出し */\n"
1881 "    result = malloc(size);\n"
1882
1883 #. type: Plain text
1884 #: build/C/man3/malloc_hook.3:122
1885 #, no-wrap
1886 msgid ""
1887 "    /* Save underlying hooks */\n"
1888 "    old_malloc_hook = __malloc_hook;\n"
1889 msgstr ""
1890 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
1891 "    old_malloc_hook = __malloc_hook;\n"
1892
1893 #. type: Plain text
1894 #: build/C/man3/malloc_hook.3:126
1895 #, no-wrap
1896 msgid ""
1897 "    /* printf() might call malloc(), so protect it too. */\n"
1898 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1899 "            (unsigned int) size, caller, result);\n"
1900 msgstr ""
1901 "    /* printf() は malloc() を呼び出す可能性があるので\n"
1902 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
1903 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
1904 "            (unsigned int) size, caller, result);\n"
1905
1906 #. type: Plain text
1907 #: build/C/man3/malloc_hook.3:129
1908 #, no-wrap
1909 msgid ""
1910 "    /* Restore our own hooks */\n"
1911 "    __malloc_hook = my_malloc_hook;\n"
1912 msgstr ""
1913 "    /* ユーザが使おうとするフックを再設定する */\n"
1914 "    __malloc_hook = my_malloc_hook;\n"
1915
1916 #. type: Plain text
1917 #: build/C/man3/malloc_hook.3:132
1918 #, no-wrap
1919 msgid ""
1920 "    return result;\n"
1921 "}\n"
1922 msgstr ""
1923 "    return result;\n"
1924 "}\n"
1925
1926 #. type: Plain text
1927 #: build/C/man3/malloc_hook.3:138
1928 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1929 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
1930
1931 #. type: TH
1932 #: build/C/man3/mallopt.3:24
1933 #, no-wrap
1934 msgid "MALLOPT"
1935 msgstr "MALLOPT"
1936
1937 #. type: TH
1938 #: build/C/man3/mallopt.3:24 build/C/man3/mtrace.3:23 build/C/man3/mcheck.3:23
1939 #, no-wrap
1940 msgid "2012-04-18"
1941 msgstr "2012-04-18"
1942
1943 #. type: Plain text
1944 #: build/C/man3/mallopt.3:27
1945 msgid "mallopt - set memory allocation parameters"
1946 msgstr ""
1947
1948 #. type: Plain text
1949 #: build/C/man3/mallopt.3:29 build/C/man3/malloc_trim.3:29
1950 #: build/C/man3/malloc_usable_size.3:28
1951 msgid "B<#include E<lt>malloc.hE<gt>>"
1952 msgstr "B<#include E<lt>malloc.hE<gt>>"
1953
1954 #. type: Plain text
1955 #: build/C/man3/mallopt.3:31
1956 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1957 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
1958
1959 #. type: Plain text
1960 #: build/C/man3/mallopt.3:42
1961 msgid ""
1962 "The B<mallopt>()  function adjusts parameters that control the behavior of "
1963 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
1964 "specifies the parameter to be modified, and I<value> specifies the new value "
1965 "for that parameter."
1966 msgstr ""
1967
1968 #. type: Plain text
1969 #: build/C/man3/mallopt.3:45
1970 msgid "The following values can be specified for I<param>:"
1971 msgstr "I<param> には以下の値を指定することができる。"
1972
1973 #. type: TP
1974 #: build/C/man3/mallopt.3:45
1975 #, no-wrap
1976 msgid "B<M_CHECK_ACTION>"
1977 msgstr "B<M_CHECK_ACTION>"
1978
1979 #. type: Plain text
1980 #: build/C/man3/mallopt.3:51
1981 msgid ""
1982 "Setting this parameter controls how glibc responds when various kinds of "
1983 "programming errors are detected (e.g., freeing the same pointer twice).  The "
1984 "3 least significant bits (2, 1, and 0) of the value assigned to this "
1985 "parameter determine the glibc behavior, as follows:"
1986 msgstr ""
1987
1988 #. type: TP
1989 #: build/C/man3/mallopt.3:52
1990 #, no-wrap
1991 msgid "Bit 0"
1992 msgstr "Bit 0"
1993
1994 #. type: Plain text
1995 #: build/C/man3/mallopt.3:62
1996 msgid ""
1997 "If this bit is set, then print a one-line message on I<stderr> that provides "
1998 "details about the error.  The message starts with the string \"***\\ glibc "
1999 "detected\\ ***\", followed by the program name, the name of the memory-"
2000 "allocation function in which the error was detected, a brief description of "
2001 "the error, and the memory address where the error was detected."
2002 msgstr ""
2003
2004 #. type: TP
2005 #: build/C/man3/mallopt.3:62
2006 #, no-wrap
2007 msgid "Bit 1"
2008 msgstr "Bit 1"
2009
2010 #. type: Plain text
2011 #: build/C/man3/mallopt.3:77
2012 msgid ""
2013 "If this bit is set, then, after printing any error message specified by bit "
2014 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
2015 "since 2.4, if bit 0 is also set, then, between printing the error message "
2016 "and aborting, the program also prints a stack trace in the manner of "
2017 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
2018 "proc/[pid]/maps> (see B<proc>(5))."
2019 msgstr ""
2020
2021 #. type: TP
2022 #: build/C/man3/mallopt.3:77
2023 #, no-wrap
2024 msgid "Bit 2 (since glibc 2.4)"
2025 msgstr "Bit 2 (glibc 2.4 以降)"
2026
2027 #. type: Plain text
2028 #: build/C/man3/mallopt.3:84
2029 msgid ""
2030 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
2031 "the one-line message describing the error is simplified to contain just the "
2032 "name of the function where the error was detected and the brief description "
2033 "of the error."
2034 msgstr ""
2035
2036 #. type: Plain text
2037 #: build/C/man3/mallopt.3:89
2038 msgid "The remaining bits in I<value> are ignored."
2039 msgstr ""
2040
2041 #. type: Plain text
2042 #: build/C/man3/mallopt.3:93
2043 msgid ""
2044 "Combining the above details, the following numeric values are meaningful for "
2045 "B<M_CHECK_ACTION>:"
2046 msgstr ""
2047
2048 #. type: IP
2049 #: build/C/man3/mallopt.3:94
2050 #, no-wrap
2051 msgid "0"
2052 msgstr ""
2053
2054 #. type: Plain text
2055 #: build/C/man3/mallopt.3:96
2056 msgid "Ignore error conditions; continue execution (with undefined results)."
2057 msgstr ""
2058
2059 #. type: IP
2060 #: build/C/man3/mallopt.3:96
2061 #, no-wrap
2062 msgid "1"
2063 msgstr "1"
2064
2065 #. type: Plain text
2066 #: build/C/man3/mallopt.3:98
2067 msgid "Print a detailed error message and continue execution."
2068 msgstr ""
2069
2070 #. type: IP
2071 #: build/C/man3/mallopt.3:98
2072 #, no-wrap
2073 msgid "2"
2074 msgstr "2"
2075
2076 #. type: Plain text
2077 #: build/C/man3/mallopt.3:100
2078 msgid "Abort the program."
2079 msgstr ""
2080
2081 #. type: IP
2082 #: build/C/man3/mallopt.3:100
2083 #, no-wrap
2084 msgid "3"
2085 msgstr ""
2086
2087 #. type: Plain text
2088 #: build/C/man3/mallopt.3:103
2089 msgid ""
2090 "Print detailed error message, stack trace, and memory mappings, and abort "
2091 "the program."
2092 msgstr ""
2093
2094 #. type: IP
2095 #: build/C/man3/mallopt.3:103
2096 #, no-wrap
2097 msgid "5"
2098 msgstr ""
2099
2100 #. type: Plain text
2101 #: build/C/man3/mallopt.3:105
2102 msgid "Print a simple error message and continue execution."
2103 msgstr ""
2104
2105 #. type: IP
2106 #: build/C/man3/mallopt.3:105
2107 #, no-wrap
2108 msgid "7"
2109 msgstr ""
2110
2111 #. type: Plain text
2112 #: build/C/man3/mallopt.3:108
2113 msgid ""
2114 "Print simple error message, stack trace, and memory mappings, and abort the "
2115 "program."
2116 msgstr ""
2117
2118 #. type: Plain text
2119 #: build/C/man3/mallopt.3:114
2120 msgid ""
2121 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
2122 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
2123 msgstr ""
2124
2125 #. type: Plain text
2126 #: build/C/man3/mallopt.3:119
2127 msgid ""
2128 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
2129 "crash may happen much later, and the true cause of the problem is then very "
2130 "hard to track down."
2131 msgstr ""
2132
2133 #. type: TP
2134 #: build/C/man3/mallopt.3:119
2135 #, no-wrap
2136 msgid "B<M_MMAP_MAX>"
2137 msgstr "B<M_MMAP_MAX>"
2138
2139 #.  The following text adapted from comments in the glibc source:
2140 #. type: Plain text
2141 #: build/C/man3/mallopt.3:129
2142 msgid ""
2143 "This parameter specifies the maximum number of allocation requests that may "
2144 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
2145 "some systems have a limited number of internal tables for use by B<mmap>(2), "
2146 "and using more than a few of them may degrade performance."
2147 msgstr ""
2148
2149 #. type: Plain text
2150 #: build/C/man3/mallopt.3:136
2151 msgid ""
2152 "The default value is 65,536, a value which has no special significance and "
2153 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
2154 "use of B<mmap>(2)  for servicing large allocation requests."
2155 msgstr ""
2156
2157 #. type: TP
2158 #: build/C/man3/mallopt.3:136
2159 #, no-wrap
2160 msgid "B<M_MMAP_THRESHOLD>"
2161 msgstr "B<M_MMAP_THRESHOLD>"
2162
2163 #. type: Plain text
2164 #: build/C/man3/mallopt.3:145
2165 msgid ""
2166 "For allocations greater than or equal to the limit specified (in bytes) by "
2167 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
2168 "allocation functions employ B<mmap>(2)  instead of increasing the program "
2169 "break using B<sbrk>(2)."
2170 msgstr ""
2171
2172 #. type: Plain text
2173 #: build/C/man3/mallopt.3:165
2174 msgid ""
2175 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
2176 "allocated memory blocks can always be independently released back to the "
2177 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
2178 "the top end.)  On the other hand, there are some disadvantages to the use of "
2179 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
2180 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
2181 "be page-aligned; and the kernel must perform the expensive task of zeroing "
2182 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
2183 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
2184 msgstr ""
2185
2186 #. type: Plain text
2187 #: build/C/man3/mallopt.3:172
2188 msgid ""
2189 "The lower limit for this parameter is 0.  The upper limit is "
2190 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
2191 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
2192 msgstr ""
2193
2194 #. type: Plain text
2195 #: build/C/man3/mallopt.3:190
2196 msgid ""
2197 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
2198 "initial value of the threshold is 128*1024, but when blocks larger than the "
2199 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
2200 "are freed, the threshold is adjusted upwards to the size of the freed "
2201 "block.  When dynamic mmap thresholding is in effect, the threshold for "
2202 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
2203 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
2204 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
2205 "parameters is set."
2206 msgstr ""
2207
2208 #. type: TP
2209 #: build/C/man3/mallopt.3:190
2210 #, no-wrap
2211 msgid "B<M_MXFAST> (since glibc 2.3)"
2212 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
2213
2214 #.  The following text adapted from comments in the glibc sources:
2215 #. type: Plain text
2216 #: build/C/man3/mallopt.3:210
2217 msgid ""
2218 "Set the upper limit for memory allocation requests that are satisfied using "
2219 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
2220 "are storage areas that hold deallocated blocks of memory of the same size "
2221 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
2222 "the same size can be handled very quickly by allocating from the fastbin, "
2223 "although memory fragmentation and the overall memory footprint of the "
2224 "program can increase.  The default value for this parameter is I<64*sizeof"
2225 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
2226 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
2227 "the use of fastbins."
2228 msgstr ""
2229
2230 #. type: TP
2231 #: build/C/man3/mallopt.3:210
2232 #, no-wrap
2233 msgid "B<M_PERTURB> (since glibc 2.4)"
2234 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
2235
2236 #. type: Plain text
2237 #: build/C/man3/mallopt.3:225
2238 msgid ""
2239 "If this parameter is set to a nonzero value, then bytes of allocated memory "
2240 "(other than allocations via B<calloc>(3))  are initialized to the complement "
2241 "of the value in the least significant byte of I<value>, and when allocated "
2242 "memory is released using B<free>(3), the freed bytes are set to the least "
2243 "significant byte of I<value>.  This can be useful for detecting errors where "
2244 "programs incorrectly rely on allocated memory being initialized to zero, or "
2245 "reuse values in memory that has already been freed."
2246 msgstr ""
2247
2248 #. type: TP
2249 #: build/C/man3/mallopt.3:225
2250 #, no-wrap
2251 msgid "B<M_TOP_PAD>"
2252 msgstr ""
2253
2254 #. type: Plain text
2255 #: build/C/man3/mallopt.3:232
2256 msgid ""
2257 "This parameter defines the amount of padding to employ when calling B<sbrk>"
2258 "(2)  to modify the program break.  (The measurement unit for this parameter "
2259 "is bytes.)  This parameter has an effect in the following circumstances:"
2260 msgstr ""
2261
2262 #. type: Plain text
2263 #: build/C/man3/mallopt.3:239
2264 msgid ""
2265 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
2266 "the B<sbrk>(2)  request."
2267 msgstr ""
2268
2269 #. type: Plain text
2270 #: build/C/man3/mallopt.3:245
2271 msgid ""
2272 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
2273 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
2274 "top of the heap."
2275 msgstr ""
2276
2277 #. type: Plain text
2278 #: build/C/man3/mallopt.3:249
2279 msgid ""
2280 "In either case, the amount of padding is always rounded to a system page "
2281 "boundary."
2282 msgstr ""
2283
2284 #. type: Plain text
2285 #: build/C/man3/mallopt.3:256
2286 msgid ""
2287 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
2288 "system calls (when the parameter is set low)  and wasting unused memory at "
2289 "the top of the heap (when the parameter is set high)."
2290 msgstr ""
2291
2292 #.  DEFAULT_TOP_PAD in glibc source
2293 #. type: Plain text
2294 #: build/C/man3/mallopt.3:259
2295 msgid "The default value for this parameter is 128*1024."
2296 msgstr ""
2297
2298 #. type: TP
2299 #: build/C/man3/mallopt.3:259
2300 #, no-wrap
2301 msgid "B<M_TRIM_THRESHOLD>"
2302 msgstr ""
2303
2304 #. type: Plain text
2305 #: build/C/man3/mallopt.3:275
2306 msgid ""
2307 "When the amount of contiguous free memory at the top of the heap grows "
2308 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
2309 "back to the system.  (This can be useful in programs that continue to "
2310 "execute for a long period after freeing a significant amount of memory.)  "
2311 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
2312 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
2313 msgstr ""
2314
2315 #. type: Plain text
2316 #: build/C/man3/mallopt.3:280
2317 msgid ""
2318 "The default value for this parameter is 128*1024.  Setting "
2319 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
2320 msgstr ""
2321
2322 #
2323 #
2324 #
2325 #.  FIXME Do the arena parameters need to be documented?
2326 #.  .TP
2327 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
2328 #.  .TP
2329 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
2330 #.  Environment variables
2331 #.      MALLOC_ARENA_MAX_
2332 #.      MALLOC_ARENA_TEST_
2333 #.  http://udrepper.livejournal.com/20948.html describes some details
2334 #.      of the MALLOC_ARENA_* environment variables.
2335 #.  These macros aren't enabled in production releases until 2.15?
2336 #.  (see glibc malloc/Makefile)
2337 #. type: Plain text
2338 #: build/C/man3/mallopt.3:303
2339 msgid ""
2340 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
2341 "of system calls (when the parameter is set low)  and wasting unused memory "
2342 "at the top of the heap (when the parameter is set high)."
2343 msgstr ""
2344
2345 #. type: SS
2346 #: build/C/man3/mallopt.3:303
2347 #, no-wrap
2348 msgid "Environment Variables"
2349 msgstr ""
2350
2351 #. type: Plain text
2352 #: build/C/man3/mallopt.3:318
2353 msgid ""
2354 "A number of environment variables can be defined to modify some of the same "
2355 "parameters as are controlled by B<mallopt>().  Using these variables has the "
2356 "advantage that the source code of the program need not be changed.  To be "
2357 "effective, these variables must be defined before the first call to a memory-"
2358 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
2359 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
2360 "these variables are ignored in set-user-ID and set-group-ID programs."
2361 msgstr ""
2362
2363 #. type: Plain text
2364 #: build/C/man3/mallopt.3:321
2365 msgid ""
2366 "The environment variables are as follows (note the trailing underscore at "
2367 "the end of the name of each variable):"
2368 msgstr ""
2369
2370 #. type: TP
2371 #: build/C/man3/mallopt.3:321
2372 #, no-wrap
2373 msgid "B<MALLOC_CHECK_>"
2374 msgstr "B<MALLOC_CHECK_>"
2375
2376 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
2377 #.  when MALLOC_CHECK_ was set.
2378 #. type: Plain text
2379 #: build/C/man3/mallopt.3:338
2380 msgid ""
2381 "This environment variable controls the same parameter as B<mallopt>()  "
2382 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
2383 "special implementation of the memory-allocation functions is used.  (This is "
2384 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
2385 "performs additional error checking, but is slower than the standard set of "
2386 "memory-allocation functions.  (This implementation does not detect all "
2387 "possible errors; memory leaks can still occur.)"
2388 msgstr ""
2389
2390 #. type: Plain text
2391 #: build/C/man3/mallopt.3:343
2392 msgid ""
2393 "The value assigned to this environment variable should be a single digit, "
2394 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
2395 "the initial digit are ignored."
2396 msgstr ""
2397
2398 #. type: Plain text
2399 #: build/C/man3/mallopt.3:352
2400 msgid ""
2401 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
2402 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
2403 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
2404 "also has an effect for set-user-ID and set-group-ID programs."
2405 msgstr ""
2406
2407 #. type: TP
2408 #: build/C/man3/mallopt.3:352
2409 #, no-wrap
2410 msgid "B<MALLOC_MMAP_MAX_>"
2411 msgstr ""
2412
2413 #. type: Plain text
2414 #: build/C/man3/mallopt.3:357
2415 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
2416 msgstr ""
2417
2418 #. type: TP
2419 #: build/C/man3/mallopt.3:357
2420 #, no-wrap
2421 msgid "B<MALLOC_MMAP_THRESHOLD_>"
2422 msgstr ""
2423
2424 #. type: Plain text
2425 #: build/C/man3/mallopt.3:362
2426 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
2427 msgstr ""
2428
2429 #. type: TP
2430 #: build/C/man3/mallopt.3:362
2431 #, no-wrap
2432 msgid "B<MALLOC_PERTURB_>"
2433 msgstr ""
2434
2435 #. type: Plain text
2436 #: build/C/man3/mallopt.3:367
2437 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
2438 msgstr ""
2439
2440 #. type: TP
2441 #: build/C/man3/mallopt.3:367
2442 #, no-wrap
2443 msgid "B<MALLOC_TRIM_THRESHOLD_>"
2444 msgstr ""
2445
2446 #. type: Plain text
2447 #: build/C/man3/mallopt.3:372
2448 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
2449 msgstr ""
2450
2451 #. type: TP
2452 #: build/C/man3/mallopt.3:372
2453 #, no-wrap
2454 msgid "B<MALLOC_TOP_PAD_>"
2455 msgstr "B<MALLOC_TOP_PAD_>"
2456
2457 #. type: Plain text
2458 #: build/C/man3/mallopt.3:377
2459 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
2460 msgstr ""
2461
2462 #. type: Plain text
2463 #: build/C/man3/mallopt.3:382
2464 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
2465 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
2466
2467 #.  .SH VERSIONS
2468 #.  Available already in glibc 2.0, possibly earlier
2469 #. type: Plain text
2470 #: build/C/man3/mallopt.3:390
2471 msgid "On error, I<errno> is I<not> set."
2472 msgstr "エラーの場合、I<errno> は設定I<されない>。"
2473
2474 #.  .SH NOTES
2475 #. type: Plain text
2476 #: build/C/man3/mallopt.3:404
2477 msgid ""
2478 "This function is not specified by POSIX or the C standards.  A similar "
2479 "function exists on many System V derivatives, but the range of values for "
2480 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
2481 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
2482 "implemented in glibc."
2483 msgstr ""
2484
2485 #. type: Plain text
2486 #: build/C/man3/mallopt.3:408
2487 msgid "Specifying an invalid value for I<param> does not generate an error."
2488 msgstr ""
2489
2490 #.  FIXME This looks buggy:
2491 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
2492 #.  malloc requests are rounded up:
2493 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
2494 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
2495 #. type: Plain text
2496 #: build/C/man3/mallopt.3:416
2497 msgid ""
2498 "A calculation error within the glibc implementation means that a call of the "
2499 "form:"
2500 msgstr ""
2501
2502 #. type: Plain text
2503 #: build/C/man3/mallopt.3:419
2504 #, no-wrap
2505 msgid "    mallopt(M_MXFAST, n)\n"
2506 msgstr ""
2507
2508 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
2509 #. type: Plain text
2510 #: build/C/man3/mallopt.3:431
2511 msgid ""
2512 "does not result in fastbins being employed for all allocations of size up to "
2513 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
2514 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
2515 "integer."
2516 msgstr ""
2517
2518 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
2519 #.  do have an effect for set-user-ID programs (but not
2520 #.  set-group-ID programs).
2521 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
2522 #. type: Plain text
2523 #: build/C/man3/mallopt.3:443
2524 msgid ""
2525 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
2526 "ignored in set-group-ID programs."
2527 msgstr ""
2528
2529 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
2530 #. type: Plain text
2531 #: build/C/man3/mallopt.3:464
2532 msgid ""
2533 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
2534 "of allocated memory are initialized to the complement of the byte in "
2535 "I<value>, and when that memory is freed, the bytes of the region are "
2536 "initialized to the byte specified in I<value>.  However, there is an off-by-"
2537 "I<sizeof(size_t)> error in the implementation: instead of initializing "
2538 "precisely the block of memory being freed by the call I<free(p)>, the block "
2539 "starting at I<p+sizeof(size_t)> is initialized."
2540 msgstr ""
2541
2542 #. type: Plain text
2543 #: build/C/man3/mallopt.3:473
2544 msgid ""
2545 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
2546 "is supplied with an (integer) command-line argument, then that argument is "
2547 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
2548 "block of memory, and frees it twice (an error)."
2549 msgstr ""
2550
2551 #. type: Plain text
2552 #: build/C/man3/mallopt.3:477
2553 msgid ""
2554 "The following shell session shows what happens when we run this program "
2555 "under glibc, with the default value for B<M_CHECK_ACTION>:"
2556 msgstr ""
2557
2558 #. type: Plain text
2559 #: build/C/man3/mallopt.3:496
2560 #, no-wrap
2561 msgid ""
2562 "$ B<./a.out>\n"
2563 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
2564 "======= Backtrace: =========\n"
2565 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
2566 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
2567 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
2568 "\\&./a.out[0x80485db]\n"
2569 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
2570 "\\&./a.out[0x8048471]\n"
2571 "======= Memory map: ========\n"
2572 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
2573 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
2574 "[some lines omitted]\n"
2575 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
2576 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
2577 "Aborted (core dumped)\n"
2578 msgstr ""
2579
2580 #. type: Plain text
2581 #: build/C/man3/mallopt.3:501
2582 msgid ""
2583 "The following runs show the results when employing other values for "
2584 "B<M_CHECK_ACTION>:"
2585 msgstr ""
2586
2587 #. type: Plain text
2588 #: build/C/man3/mallopt.3:514
2589 #, no-wrap
2590 msgid ""
2591 "$ B<./a.out 1>             # Diagnose error and continue\n"
2592 "main(): returned from first free() call\n"
2593 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
2594 "main(): returned from second free() call\n"
2595 "$ B<./a.out 2>             # Abort without error message\n"
2596 "main(): returned from first free() call\n"
2597 "Aborted (core dumped)\n"
2598 "$ B<./a.out 0>             # Ignore error and continue\n"
2599 "main(): returned from first free() call\n"
2600 "main(): returned from second free() call\n"
2601 msgstr ""
2602
2603 #. type: Plain text
2604 #: build/C/man3/mallopt.3:520
2605 msgid ""
2606 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
2607 "environment variable:"
2608 msgstr ""
2609
2610 #. type: Plain text
2611 #: build/C/man3/mallopt.3:527
2612 #, no-wrap
2613 msgid ""
2614 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
2615 "main(): returned from first free() call\n"
2616 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
2617 "main(): returned from second free() call\n"
2618 msgstr ""
2619
2620 #. type: SS
2621 #: build/C/man3/mallopt.3:529 build/C/man2/mprotect.2:159
2622 #: build/C/man3/mcheck.3:176
2623 #, no-wrap
2624 msgid "Program source"
2625 msgstr "プログラムのソース"
2626
2627 #. type: Plain text
2628 #: build/C/man3/mallopt.3:535
2629 #, no-wrap
2630 msgid ""
2631 "#include E<lt>malloc.hE<gt>\n"
2632 "#include E<lt>stdio.hE<gt>\n"
2633 "#include E<lt>stdlib.hE<gt>\n"
2634 msgstr ""
2635 "#include E<lt>malloc.hE<gt>\n"
2636 "#include E<lt>stdio.hE<gt>\n"
2637 "#include E<lt>stdlib.hE<gt>\n"
2638
2639 #. type: Plain text
2640 #: build/C/man3/mallopt.3:540 build/C/man3/mcheck.3:187
2641 #, no-wrap
2642 msgid ""
2643 "int\n"
2644 "main(int argc, char *argv[])\n"
2645 "{\n"
2646 "    char *p;\n"
2647 msgstr ""
2648 "int\n"
2649 "main(int argc, char *argv[])\n"
2650 "{\n"
2651 "    char *p;\n"
2652
2653 #. type: Plain text
2654 #: build/C/man3/mallopt.3:547
2655 #, no-wrap
2656 msgid ""
2657 "    if (argc E<gt> 1) {\n"
2658 "        if (argc != 2) {\n"
2659 "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2660 "            exit(EXIT_FAILURE);\n"
2661 "        }\n"
2662 "    }\n"
2663 msgstr ""
2664 "    if (argc E<gt> 1) {\n"
2665 "        if (argc != 2) {\n"
2666 "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2667 "            exit(EXIT_FAILURE);\n"
2668 "        }\n"
2669 "    }\n"
2670
2671 #. type: Plain text
2672 #: build/C/man3/mallopt.3:552
2673 #, no-wrap
2674 msgid ""
2675 "    if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2676 "        fprintf(stderr, \"mallopt() failed\");\n"
2677 "        exit(EXIT_FAILURE);\n"
2678 "    }\n"
2679 msgstr ""
2680 "    if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2681 "        fprintf(stderr, \"mallopt() failed\");\n"
2682 "        exit(EXIT_FAILURE);\n"
2683 "    }\n"
2684
2685 #. type: Plain text
2686 #: build/C/man3/mallopt.3:558
2687 #, no-wrap
2688 msgid ""
2689 "    p = malloc(1000);\n"
2690 "    if (p == NULL) {\n"
2691 "        fprintf(stderr, \"malloc() failed\");\n"
2692 "        exit(EXIT_FAILURE);\n"
2693 "    }\n"
2694 msgstr ""
2695 "    p = malloc(1000);\n"
2696 "    if (p == NULL) {\n"
2697 "        fprintf(stderr, \"malloc() failed\");\n"
2698 "        exit(EXIT_FAILURE);\n"
2699 "    }\n"
2700
2701 #. type: Plain text
2702 #: build/C/man3/mallopt.3:561
2703 #, no-wrap
2704 msgid ""
2705 "    free(p);\n"
2706 "    printf(\"main(): returned from first free() call\\en\");\n"
2707 msgstr ""
2708
2709 #. type: Plain text
2710 #: build/C/man3/mallopt.3:564
2711 #, no-wrap
2712 msgid ""
2713 "    free(p);\n"
2714 "    printf(\"main(): returned from second free() call\\en\");\n"
2715 msgstr ""
2716
2717 #. type: Plain text
2718 #: build/C/man3/mallopt.3:567 build/C/man2/mmap.2:652
2719 #: build/C/man3/mcheck.3:203
2720 #, no-wrap
2721 msgid ""
2722 "    exit(EXIT_SUCCESS);\n"
2723 "}\n"
2724 msgstr ""
2725 "    exit(EXIT_SUCCESS);\n"
2726 "}\n"
2727
2728 #. type: Plain text
2729 #: build/C/man3/mallopt.3:580
2730 msgid ""
2731 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2732 "B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
2733 msgstr ""
2734 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3),\n"
2735 "B<malloc_hook>(3), B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3),\n"
2736 "B<posix_memalign>(3)"
2737
2738 #. type: TH
2739 #: build/C/man2/mlock.2:27
2740 #, no-wrap
2741 msgid "MLOCK"
2742 msgstr "MLOCK"
2743
2744 #. type: TH
2745 #: build/C/man2/mlock.2:27
2746 #, no-wrap
2747 msgid "2011-09-14"
2748 msgstr "2011-09-14"
2749
2750 #. type: Plain text
2751 #: build/C/man2/mlock.2:30
2752 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
2753 msgstr "mlock - メモリのロックとロック解除を行う"
2754
2755 #. type: Plain text
2756 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
2757 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
2758 #, no-wrap
2759 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
2760 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
2761
2762 #. type: Plain text
2763 #: build/C/man2/mlock.2:36
2764 #, no-wrap
2765 msgid ""
2766 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2767 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2768 msgstr ""
2769 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2770 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
2771
2772 #. type: Plain text
2773 #: build/C/man2/mlock.2:39
2774 #, no-wrap
2775 msgid ""
2776 "B<int mlockall(int >I<flags>B<);>\n"
2777 "B<int munlockall(void);>\n"
2778 msgstr ""
2779 "B<int mlockall(int >I<flags>B<);>\n"
2780 "B<int munlockall(void);>\n"
2781
2782 #. type: Plain text
2783 #: build/C/man2/mlock.2:55
2784 msgid ""
2785 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
2786 "process's virtual address space into RAM, preventing that memory from being "
2787 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
2788 "converse operation, respectively unlocking part or all of the calling "
2789 "process's virtual address space, so that pages in the specified virtual "
2790 "address range may once more to be swapped out if required by the kernel "
2791 "memory manager.  Memory locking and unlocking are performed in units of "
2792 "whole pages."
2793 msgstr ""
2794 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
2795 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
2796 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
2797 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
2798 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
2799 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
2800 "る。"
2801
2802 #. type: SS
2803 #: build/C/man2/mlock.2:55
2804 #, no-wrap
2805 msgid "mlock() and munlock()"
2806 msgstr "mlock() と munlock()"
2807
2808 #. type: Plain text
2809 #: build/C/man2/mlock.2:65
2810 msgid ""
2811 "B<mlock>()  locks pages in the address range starting at I<addr> and "
2812 "continuing for I<len> bytes.  All pages that contain a part of the specified "
2813 "address range are guaranteed to be resident in RAM when the call returns "
2814 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
2815 msgstr ""
2816 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
2817 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
2818 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
2819 "れるまで RAM に残り続けることが保証される。"
2820
2821 #. type: Plain text
2822 #: build/C/man2/mlock.2:74
2823 msgid ""
2824 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
2825 "continuing for I<len> bytes.  After this call, all pages that contain a part "
2826 "of the specified memory range can be moved to external swap space again by "
2827 "the kernel."
2828 msgstr ""
2829 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
2830 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
2831 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
2832
2833 #. type: SS
2834 #: build/C/man2/mlock.2:74
2835 #, no-wrap
2836 msgid "mlockall() and munlockall()"
2837 msgstr "mlockall() と munlockall()"
2838
2839 #. type: Plain text
2840 #: build/C/man2/mlock.2:84
2841 msgid ""
2842 "B<mlockall>()  locks all pages mapped into the address space of the calling "
2843 "process.  This includes the pages of the code, data and stack segment, as "
2844 "well as shared libraries, user space kernel data, shared memory, and memory-"
2845 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
2846 "the call returns successfully; the pages are guaranteed to stay in RAM until "
2847 "later unlocked."
2848 msgstr ""
2849 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
2850 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
2851 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
2852 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
2853 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
2854 "残り続けることが保証される。"
2855
2856 #. type: Plain text
2857 #: build/C/man2/mlock.2:89
2858 msgid ""
2859 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
2860 "following constants:"
2861 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
2862
2863 #. type: TP
2864 #: build/C/man2/mlock.2:89
2865 #, no-wrap
2866 msgid "B<MCL_CURRENT>"
2867 msgstr "B<MCL_CURRENT>"
2868
2869 #. type: Plain text
2870 #: build/C/man2/mlock.2:93
2871 msgid ""
2872 "Lock all pages which are currently mapped into the address space of the "
2873 "process."
2874 msgstr ""
2875 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
2876
2877 #. type: TP
2878 #: build/C/man2/mlock.2:93
2879 #, no-wrap
2880 msgid "B<MCL_FUTURE>"
2881 msgstr "B<MCL_FUTURE>"
2882
2883 #. type: Plain text
2884 #: build/C/man2/mlock.2:100
2885 msgid ""
2886 "Lock all pages which will become mapped into the address space of the "
2887 "process in the future.  These could be for instance new pages required by a "
2888 "growing heap and stack as well as new memory mapped files or shared memory "
2889 "regions."
2890 msgstr ""
2891 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
2892 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
2893 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
2894
2895 #. type: Plain text
2896 #: build/C/man2/mlock.2:113
2897 msgid ""
2898 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
2899 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
2900 "locked bytes to exceed the permitted maximum (see below).  In the same "
2901 "circumstances, stack growth may likewise fail: the kernel will deny stack "
2902 "expansion and deliver a B<SIGSEGV> signal to the process."
2903 msgstr ""
2904 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
2905 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
2906 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
2907 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
2908 "スに送る。"
2909
2910 #. type: Plain text
2911 #: build/C/man2/mlock.2:117
2912 msgid ""
2913 "B<munlockall>()  unlocks all pages mapped into the address space of the "
2914 "calling process."
2915 msgstr ""
2916 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
2917 "全てのページをロック解除する。"
2918
2919 #. type: Plain text
2920 #: build/C/man2/mlock.2:123
2921 msgid ""
2922 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
2923 "is set appropriately, and no changes are made to any locks in the address "
2924 "space of the process."
2925 msgstr ""
2926 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
2927 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
2928 "れない。"
2929
2930 #. type: Plain text
2931 #: build/C/man2/mlock.2:132
2932 msgid ""
2933 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
2934 "resource limit, but tried to lock more memory than the limit permitted.  "
2935 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
2936 msgstr ""
2937 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
2938 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
2939 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
2940
2941 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
2942 #.  take into account whether the to-be-locked range overlaps with
2943 #.  already locked pages.  Thus, suppose we allocate
2944 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
2945 #.  mlock(), and then lock the *same* page range a second time.
2946 #.  In the case, the second mlock() call will fail, since the check
2947 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
2948 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
2949 #. type: Plain text
2950 #: build/C/man2/mlock.2:144
2951 msgid ""
2952 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
2953 "RAM."
2954 msgstr ""
2955 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
2956
2957 #. SVr4 documents an additional EAGAIN error code.
2958 #. type: Plain text
2959 #: build/C/man2/mlock.2:150
2960 msgid ""
2961 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
2962 "perform the requested operation."
2963 msgstr ""
2964 "呼び出し側が特権を持っていないが、\n"
2965 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
2966
2967 #. type: Plain text
2968 #: build/C/man2/mlock.2:155
2969 msgid "For B<mlock>()  and B<munlock>():"
2970 msgstr "B<mlock>()  と B<munlock>()  用として:"
2971
2972 #. type: Plain text
2973 #: build/C/man2/mlock.2:158
2974 msgid "Some or all of the specified address range could not be locked."
2975 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
2976
2977 #. type: Plain text
2978 #: build/C/man2/mlock.2:165
2979 msgid ""
2980 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
2981 "addition may have resulted in an overflow)."
2982 msgstr ""
2983 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
2984 "(例えば、加算でオーバーフローが発生したなど)。"
2985
2986 #. type: Plain text
2987 #: build/C/man2/mlock.2:170
2988 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
2989 msgstr ""
2990 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
2991
2992 #. type: Plain text
2993 #: build/C/man2/mlock.2:174
2994 msgid ""
2995 "Some of the specified address range does not correspond to mapped pages in "
2996 "the address space of the process."
2997 msgstr ""
2998 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
2999 "い。"
3000
3001 #. type: Plain text
3002 #: build/C/man2/mlock.2:177
3003 msgid "For B<mlockall>():"
3004 msgstr "B<mlockall>()  用として:"
3005
3006 #. type: Plain text
3007 #: build/C/man2/mlock.2:180
3008 msgid "Unknown I<flags> were specified."
3009 msgstr "未知の I<flags> が指定された。"
3010
3011 #. type: Plain text
3012 #: build/C/man2/mlock.2:183
3013 msgid "For B<munlockall>():"
3014 msgstr "B<munlockall>()  用として:"
3015
3016 #. type: Plain text
3017 #: build/C/man2/mlock.2:187
3018 msgid ""
3019 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
3020 msgstr ""
3021 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
3022
3023 #. type: Plain text
3024 #: build/C/man2/mlock.2:189
3025 msgid "POSIX.1-2001, SVr4."
3026 msgstr "POSIX.1-2001, SVr4."
3027
3028 #. type: SH
3029 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
3030 #, no-wrap
3031 msgid "AVAILABILITY"
3032 msgstr "可用性"
3033
3034 #. type: Plain text
3035 #: build/C/man2/mlock.2:201
3036 msgid ""
3037 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
3038 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
3039 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
3040 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
3041 msgstr ""
3042 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
3043 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
3044 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
3045 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
3046 "び出すことで決定できる。"
3047
3048 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
3049 #.  -1: unavailable, 0: ask using sysconf().
3050 #.  glibc defines it to 1.
3051 #. type: Plain text
3052 #: build/C/man2/mlock.2:214
3053 msgid ""
3054 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
3055 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
3056 "than 0.  (See also B<sysconf>(3).)"
3057 msgstr ""
3058 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
3059 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
3060 "(B<sysconf>(3)  も参照のこと)。"
3061
3062 #. type: Plain text
3063 #: build/C/man2/mlock.2:232
3064 msgid ""
3065 "Memory locking has two main applications: real-time algorithms and high-"
3066 "security data processing.  Real-time applications require deterministic "
3067 "timing, and, like scheduling, paging is one major cause of unexpected "
3068 "program execution delays.  Real-time applications will usually also switch "
3069 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
3070 "security software often handles critical bytes like passwords or secret keys "
3071 "as data structures.  As a result of paging, these secrets could be "
3072 "transferred onto a persistent swap store medium, where they might be "
3073 "accessible to the enemy long after the security software has erased the "
3074 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
3075 "laptops and some desktop computers will save a copy of the system's RAM to "
3076 "disk, regardless of memory locks.)"
3077 msgstr ""
3078 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
3079 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
3080 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
3081 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
3082 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
3083 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
3084 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
3085 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
3086 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
3087 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
3088 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
3089 "存することに注意)。"
3090
3091 #. type: Plain text
3092 #: build/C/man2/mlock.2:245
3093 msgid ""
3094 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
3095 "faults should reserve enough locked stack pages before entering the time-"
3096 "critical section, so that no page fault can be caused by function calls.  "
3097 "This can be achieved by calling a function that allocates a sufficiently "
3098 "large automatic variable (an array) and writes to the memory occupied by "
3099 "this array in order to touch these stack pages.  This way, enough pages will "
3100 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
3101 "that not even copy-on-write page faults can occur in the critical section."
3102 msgstr ""
3103 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
3104 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
3105 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
3106 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
3107 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
3108 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
3109 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
3110 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
3111 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
3112
3113 #. type: Plain text
3114 #: build/C/man2/mlock.2:251
3115 msgid ""
3116 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
3117 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
3118 "terminates."
3119 msgstr ""
3120 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
3121 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
3122 "れる)。"
3123
3124 #. type: Plain text
3125 #: build/C/man2/mlock.2:255
3126 msgid ""
3127 "The memory lock on an address range is automatically removed if the address "
3128 "range is unmapped via B<munmap>(2)."
3129 msgstr ""
3130 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
3131 "よってアンマップされた場合は削除される。"
3132
3133 #. type: Plain text
3134 #: build/C/man2/mlock.2:268
3135 msgid ""
3136 "Memory locks do not stack, that is, pages which have been locked several "
3137 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
3138 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
3139 "Pages which are mapped to several locations or by several processes stay "
3140 "locked into RAM as long as they are locked at least at one location or by at "
3141 "least one process."
3142 msgstr ""
3143 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
3144 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
3145 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
3146 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
3147 "のプロセスでロックされている限りは RAM に残り続ける。"
3148
3149 #. type: Plain text
3150 #: build/C/man2/mlock.2:279
3151 msgid ""
3152 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
3153 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
3154 "implementation to require that I<addr> is page aligned, so portable "
3155 "applications should ensure this."
3156 msgstr ""
3157 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
3158 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
3159 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
3160 "ケーションではきちんと境界に合わせた方が良い。"
3161
3162 #. type: Plain text
3163 #: build/C/man2/mlock.2:292
3164 msgid ""
3165 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
3166 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
3167 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
3168 msgstr ""
3169 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
3170 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
3171 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
3172 "表示される。"
3173
3174 #. type: SS
3175 #: build/C/man2/mlock.2:292
3176 #, no-wrap
3177 msgid "Limits and permissions"
3178 msgstr "制限と権限"
3179
3180 #. type: Plain text
3181 #: build/C/man2/mlock.2:299
3182 msgid ""
3183 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
3184 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
3185 "defines a limit on how much memory the process may lock."
3186 msgstr ""
3187 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
3188 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
3189 "できるかの制限を定義する。"
3190
3191 #. type: Plain text
3192 #: build/C/man2/mlock.2:305
3193 msgid ""
3194 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
3195 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
3196 "instead defines a limit on how much memory an unprivileged process may lock."
3197 msgstr ""
3198 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
3199 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
3200 "クできるメモリ量の制限を定義する。"
3201
3202 #. type: Plain text
3203 #: build/C/man2/mlock.2:313
3204 msgid ""
3205 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
3206 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
3207 "was rectified in kernel 2.4.18."
3208 msgstr ""
3209 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
3210 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
3211 "ネル 2.4.18 で修正された。"
3212
3213 #.  See the following LKML thread:
3214 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
3215 #.  "Rationale for RLIMIT_MEMLOCK"
3216 #.  23 Jan 2006
3217 #. type: Plain text
3218 #: build/C/man2/mlock.2:330
3219 msgid ""
3220 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
3221 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
3222 "example, setting its effective UID to a nonzero value), then subsequent "
3223 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
3224 "B<RLIMIT_MEMLOCK> resource limit is encountered."
3225 msgstr ""
3226 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
3227 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
3228 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
3229 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
3230 "B<brk>(2))  は失敗する。"
3231
3232 #. type: Plain text
3233 #: build/C/man2/mlock.2:337
3234 msgid ""
3235 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
3236 "B<capabilities>(7)"
3237 msgstr ""
3238 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
3239 "B<capabilities>(7)"
3240
3241 #. type: TH
3242 #: build/C/man2/mmap.2:40
3243 #, no-wrap
3244 msgid "MMAP"
3245 msgstr "MMAP"
3246
3247 #. type: TH
3248 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
3249 #, no-wrap
3250 msgid "2012-04-16"
3251 msgstr "2012-04-16"
3252
3253 #. type: Plain text
3254 #: build/C/man2/mmap.2:43
3255 msgid "mmap, munmap - map or unmap files or devices into memory"
3256 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
3257
3258 #. type: Plain text
3259 #: build/C/man2/mmap.2:51
3260 #, no-wrap
3261 msgid ""
3262 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3263 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
3264 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3265 msgstr ""
3266 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3267 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
3268 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3269
3270 #. type: Plain text
3271 #: build/C/man2/mmap.2:61
3272 msgid ""
3273 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
3274 "process.  The starting address for the new mapping is specified in I<addr>.  "
3275 "The I<length> argument specifies the length of the mapping."
3276 msgstr ""
3277 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
3278 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
3279 "は I<length> 引き数で指定される。"
3280
3281 #.  Before Linux 2.6.24, the address was rounded up to the next page
3282 #.  boundary; since 2.6.24, it is rounded down!
3283 #. type: Plain text
3284 #: build/C/man2/mmap.2:75
3285 msgid ""
3286 "If I<addr> is NULL, then the kernel chooses the address at which to create "
3287 "the mapping; this is the most portable method of creating a new mapping.  If "
3288 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
3289 "the mapping; on Linux, the mapping will be created at a nearby page "
3290 "boundary.  The address of the new mapping is returned as the result of the "
3291 "call."
3292 msgstr ""
3293 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
3294 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
3295 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
3296 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
3297 "ングのアドレスは、呼び出しの返り値として返される。"
3298
3299 #. type: Plain text
3300 #: build/C/man2/mmap.2:87
3301 msgid ""
3302 "The contents of a file mapping (as opposed to an anonymous mapping; see "
3303 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
3304 "offset I<offset> in the file (or other object) referred to by the file "
3305 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
3306 "by I<sysconf(_SC_PAGE_SIZE)>."
3307 msgstr ""
3308 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
3309 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
3310 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
3311 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
3312 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
3313
3314 #. type: Plain text
3315 #: build/C/man2/mmap.2:95
3316 msgid ""
3317 "The I<prot> argument describes the desired memory protection of the mapping "
3318 "(and must not conflict with the open mode of the file).  It is either "
3319 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
3320 msgstr ""
3321 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
3322 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
3323 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
3324
3325 #. type: TP
3326 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
3327 #, no-wrap
3328 msgid "B<PROT_EXEC>"
3329 msgstr "B<PROT_EXEC>"
3330
3331 #. type: Plain text
3332 #: build/C/man2/mmap.2:98
3333 msgid "Pages may be executed."
3334 msgstr "ページは実行可能である。"
3335
3336 #. type: TP
3337 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
3338 #, no-wrap
3339 msgid "B<PROT_READ>"
3340 msgstr "B<PROT_READ>"
3341
3342 #. type: Plain text
3343 #: build/C/man2/mmap.2:101
3344 msgid "Pages may be read."
3345 msgstr "ページは読み込み可能である。"
3346
3347 #. type: TP
3348 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
3349 #, no-wrap
3350 msgid "B<PROT_WRITE>"
3351 msgstr "B<PROT_WRITE>"
3352
3353 #. type: Plain text
3354 #: build/C/man2/mmap.2:104
3355 msgid "Pages may be written."
3356 msgstr "ページに書き込み可能である。"
3357
3358 #. type: TP
3359 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
3360 #, no-wrap
3361 msgid "B<PROT_NONE>"
3362 msgstr "B<PROT_NONE>"
3363
3364 #. type: Plain text
3365 #: build/C/man2/mmap.2:107
3366 msgid "Pages may not be accessed."
3367 msgstr "ページにはアクセスできない。"
3368
3369 #. type: Plain text
3370 #: build/C/man2/mmap.2:116
3371 msgid ""
3372 "The I<flags> argument determines whether updates to the mapping are visible "
3373 "to other processes mapping the same region, and whether updates are carried "
3374 "through to the underlying file.  This behavior is determined by including "
3375 "exactly one of the following values in I<flags>:"
3376 msgstr ""
3377 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
3378 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
3379 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
3380 "I<flags> に含めることで指定する。"
3381
3382 #. type: TP
3383 #: build/C/man2/mmap.2:116
3384 #, no-wrap
3385 msgid "B<MAP_SHARED>"
3386 msgstr "B<MAP_SHARED>"
3387
3388 #. type: Plain text
3389 #: build/C/man2/mmap.2:126
3390 msgid ""
3391 "Share this mapping.  Updates to the mapping are visible to other processes "
3392 "that map this file, and are carried through to the underlying file.  The "
3393 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
3394 "called."
3395 msgstr ""
3396 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
3397 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
3398 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
3399 "るまで行われないこともある。"
3400
3401 #. type: TP
3402 #: build/C/man2/mmap.2:126
3403 #, no-wrap
3404 msgid "B<MAP_PRIVATE>"
3405 msgstr "B<MAP_PRIVATE>"
3406
3407 #. type: Plain text
3408 #: build/C/man2/mmap.2:135
3409 msgid ""
3410 "Create a private copy-on-write mapping.  Updates to the mapping are not "
3411 "visible to other processes mapping the same file, and are not carried "
3412 "through to the underlying file.  It is unspecified whether changes made to "
3413 "the file after the B<mmap>()  call are visible in the mapped region."
3414 msgstr ""
3415 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
3416 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
3417 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
3418 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
3419 "かは規定されていない。"
3420
3421 #. type: Plain text
3422 #: build/C/man2/mmap.2:137
3423 msgid "Both of these flags are described in POSIX.1-2001."
3424 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
3425
3426 #. type: Plain text
3427 #: build/C/man2/mmap.2:140
3428 msgid ""
3429 "In addition, zero or more of the following values can be ORed in I<flags>:"
3430 msgstr ""
3431 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
3432 "ことができる。"
3433
3434 #. type: TP
3435 #: build/C/man2/mmap.2:140
3436 #, no-wrap
3437 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
3438 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
3439
3440 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3441 #. type: Plain text
3442 #: build/C/man2/mmap.2:156
3443 msgid ""
3444 "Put the mapping into the first 2 Gigabytes of the process address space.  "
3445 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
3446 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
3447 "as to improve context-switch performance on some early 64-bit processors.  "
3448 "Modern x86-64 processors no longer have this performance problem, so use of "
3449 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
3450 "ignored when B<MAP_FIXED> is set."
3451 msgstr ""
3452 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
3453 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
3454 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
3455 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
3456 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
3457 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
3458 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
3459 "グは無視される。"
3460
3461 #. type: TP
3462 #: build/C/man2/mmap.2:156
3463 #, no-wrap
3464 msgid "B<MAP_ANON>"
3465 msgstr "B<MAP_ANON>"
3466
3467 #. type: Plain text
3468 #: build/C/man2/mmap.2:161
3469 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
3470 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
3471
3472 #. type: TP
3473 #: build/C/man2/mmap.2:161
3474 #, no-wrap
3475 msgid "B<MAP_ANONYMOUS>"
3476 msgstr "B<MAP_ANONYMOUS>"
3477
3478 #. type: Plain text
3479 #: build/C/man2/mmap.2:183
3480 msgid ""
3481 "The mapping is not backed by any file; its contents are initialized to "
3482 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
3483 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
3484 "is specified, and portable applications should ensure this.  The use of "
3485 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
3486 "Linux since kernel 2.4."
3487 msgstr ""
3488 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
3489 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
3490 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
3491 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
3492 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
3493 "以降の Linux でのみサポートされている。"
3494
3495 #. type: TP
3496 #: build/C/man2/mmap.2:183
3497 #, no-wrap
3498 msgid "B<MAP_DENYWRITE>"
3499 msgstr "B<MAP_DENYWRITE>"
3500
3501 #.  Introduced in 1.1.36, removed in 1.3.24.
3502 #. type: Plain text
3503 #: build/C/man2/mmap.2:191
3504 msgid ""
3505 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
3506 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
3507 "denial-of-service attacks.)"
3508 msgstr ""
3509 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
3510 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
3511 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
3512
3513 #. type: TP
3514 #: build/C/man2/mmap.2:191
3515 #, no-wrap
3516 msgid "B<MAP_EXECUTABLE>"
3517 msgstr "B<MAP_EXECUTABLE>"
3518
3519 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
3520 #.  (Long ago, it signaled that the underlying file is an executable.
3521 #.  However, that information was not really used anywhere.)
3522 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
3523 #.  MAP_DENYWRITE?
3524 #. type: Plain text
3525 #: build/C/man2/mmap.2:199
3526 msgid "This flag is ignored."
3527 msgstr "このフラグは無視される。"
3528
3529 #. type: TP
3530 #: build/C/man2/mmap.2:199
3531 #, no-wrap
3532 msgid "B<MAP_FILE>"
3533 msgstr "B<MAP_FILE>"
3534
3535 #.  On some systems, this was required as the opposite of
3536 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
3537 #. type: Plain text
3538 #: build/C/man2/mmap.2:205
3539 msgid "Compatibility flag.  Ignored."
3540 msgstr "互換性のためのフラグ。無視される。"
3541
3542 #. type: TP
3543 #: build/C/man2/mmap.2:205
3544 #, no-wrap
3545 msgid "B<MAP_FIXED>"
3546 msgstr "B<MAP_FIXED>"
3547
3548 #. type: Plain text
3549 #: build/C/man2/mmap.2:223
3550 msgid ""
3551 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
3552 "address.  I<addr> must be a multiple of the page size.  If the memory region "
3553 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
3554 "then the overlapped part of the existing mapping(s) will be discarded.  If "
3555 "the specified address cannot be used, B<mmap>()  will fail.  Because "
3556 "requiring a fixed address for a mapping is less portable, the use of this "
3557 "option is discouraged."
3558 msgstr ""
3559 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
3560 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
3561 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
3562 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
3563 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
3564 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
3565 "を推奨する。"
3566
3567 #. type: TP
3568 #: build/C/man2/mmap.2:223
3569 #, no-wrap
3570 msgid "B<MAP_GROWSDOWN>"
3571 msgstr "B<MAP_GROWSDOWN>"
3572
3573 #. type: Plain text
3574 #: build/C/man2/mmap.2:228
3575 msgid ""
3576 "Used for stacks.  Indicates to the kernel virtual memory system that the "
3577 "mapping should extend downward in memory."
3578 msgstr ""
3579 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
3580 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
3581 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
3582
3583 #. type: TP
3584 #: build/C/man2/mmap.2:228
3585 #, no-wrap
3586 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
3587 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
3588
3589 #. type: Plain text
3590 #: build/C/man2/mmap.2:234
3591 msgid ""
3592 "Allocate the mapping using \"huge pages.\" See the kernel source file "
3593 "I<Documentation/vm/hugetlbpage.txt> for further information."
3594 msgstr ""
3595 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
3596 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
3597
3598 #. type: TP
3599 #: build/C/man2/mmap.2:234
3600 #, no-wrap
3601 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
3602 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
3603
3604 #.  If set, the mapped pages will not be swapped out.
3605 #. type: Plain text
3606 #: build/C/man2/mmap.2:240
3607 msgid ""
3608 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
3609 "(2).  This flag is ignored in older kernels."
3610 msgstr ""
3611 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
3612 "前のカーネルでは、このフラグは無視される。"
3613
3614 #. type: TP
3615 #: build/C/man2/mmap.2:240
3616 #, no-wrap
3617 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
3618 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
3619
3620 #. type: Plain text
3621 #: build/C/man2/mmap.2:255
3622 msgid ""
3623 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
3624 "ahead: only create page tables entries for pages that are already present in "
3625 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
3626 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
3627 "reimplemented."
3628 msgstr ""
3629 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
3630 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
3631 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
3632 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
3633 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
3634
3635 #. type: TP
3636 #: build/C/man2/mmap.2:255
3637 #, no-wrap
3638 msgid "B<MAP_NORESERVE>"
3639 msgstr "B<MAP_NORESERVE>"
3640
3641 #. type: Plain text
3642 #: build/C/man2/mmap.2:270
3643 msgid ""
3644 "Do not reserve swap space for this mapping.  When swap space is reserved, "
3645 "one has the guarantee that it is possible to modify the mapping.  When swap "
3646 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
3647 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
3648 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
3649 "effect for private writable mappings."
3650 msgstr ""
3651 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
3652 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
3653 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
3654 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
3655 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
3656 "イベート・マッピングについてのみ効果があった。"
3657
3658 #. type: TP
3659 #: build/C/man2/mmap.2:270
3660 #, no-wrap
3661 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
3662 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
3663
3664 #. type: Plain text
3665 #: build/C/man2/mmap.2:277
3666 msgid ""
3667 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
3668 "causes read-ahead on the file.  Later accesses to the mapping will not be "
3669 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
3670 "mappings since Linux 2.6.23."
3671 msgstr ""
3672 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
3673 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
3674 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
3675 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
3676 "ポートされている。"
3677
3678 #. type: TP
3679 #: build/C/man2/mmap.2:277
3680 #, no-wrap
3681 msgid "B<MAP_STACK> (since Linux 2.6.27)"
3682 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
3683
3684 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3685 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
3686 #.  http://thread.gmane.org/gmane.linux.kernel/720412
3687 #.  "pthread_create() slow for many threads; also time to revisit 64b
3688 #.   context switch optimization?"
3689 #. type: Plain text
3690 #: build/C/man2/mmap.2:290
3691 msgid ""
3692 "Allocate the mapping at an address suitable for a process or thread stack.  "
3693 "This flag is currently a no-op, but is used in the glibc threading "
3694 "implementation so that if some architectures require special treatment for "
3695 "stack allocations, support can later be transparently implemented for glibc."
3696 msgstr ""
3697 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
3698 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
3699 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
3700 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
3701 "る。"
3702
3703 #. type: TP
3704 #: build/C/man2/mmap.2:290
3705 #, no-wrap
3706 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
3707 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
3708
3709 #. type: Plain text
3710 #: build/C/man2/mmap.2:300
3711 msgid ""
3712 "Don't clear anonymous pages.  This flag is intended to improve performance "
3713 "on embedded devices.  This flag is only honored if the kernel was configured "
3714 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
3715 "implications, that option is normally enabled only on embedded devices (i."
3716 "e., devices where one has complete control of the contents of user memory)."
3717 msgstr ""
3718 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
3719 "ス\n"
3720 "での性能向上を目的に作られてものである。カーネルの設定で\n"
3721 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
3722 "このフラグは効果を持つ。\n"
3723 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
3724 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
3725
3726 #. type: Plain text
3727 #: build/C/man2/mmap.2:308
3728 msgid ""
3729 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
3730 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
3731 "B<MAP_ANON>)."
3732 msgstr ""
3733 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
3734 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
3735 "B<MAP_ANON>)  もサポートされている。"
3736
3737 #. type: Plain text
3738 #: build/C/man2/mmap.2:315
3739 msgid ""
3740 "Some systems document the additional flags B<MAP_AUTOGROW>, "
3741 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
3742 msgstr ""
3743 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
3744 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
3745
3746 #. type: Plain text
3747 #: build/C/man2/mmap.2:321
3748 msgid ""
3749 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
3750 "attributes."
3751 msgstr ""
3752 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
3753
3754 #. type: Plain text
3755 #: build/C/man2/mmap.2:329
3756 msgid ""
3757 "A file is mapped in multiples of the page size.  For a file that is not a "
3758 "multiple of the page size, the remaining memory is zeroed when mapped, and "
3759 "writes to that region are not written out to the file.  The effect of "
3760 "changing the size of the underlying file of a mapping on the pages that "
3761 "correspond to added or removed regions of the file is unspecified."
3762 msgstr ""
3763 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
3764 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
3765 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
3766 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
3767 "マップされたページに対してどのような影響があるかは規定されていない。"
3768
3769 #. type: SS
3770 #: build/C/man2/mmap.2:329
3771 #, no-wrap
3772 msgid "munmap()"
3773 msgstr "munmap()"
3774
3775 #. type: Plain text
3776 #: build/C/man2/mmap.2:339
3777 msgid ""
3778 "The B<munmap>()  system call deletes the mappings for the specified address "
3779 "range, and causes further references to addresses within the range to "
3780 "generate invalid memory references.  The region is also automatically "
3781 "unmapped when the process is terminated.  On the other hand, closing the "
3782 "file descriptor does not unmap the region."
3783 msgstr ""
3784 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
3785 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
3786 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
3787 "はアンマップされない。"
3788
3789 #. type: Plain text
3790 #: build/C/man2/mmap.2:349
3791 msgid ""
3792 "The address I<addr> must be a multiple of the page size.  All pages "
3793 "containing a part of the indicated range are unmapped, and subsequent "
3794 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
3795 "the indicated range does not contain any mapped pages."
3796 msgstr ""
3797 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
3798 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
3799 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
3800 "ていない場合でも エラーにならない。"
3801
3802 #. type: SS
3803 #: build/C/man2/mmap.2:349
3804 #, no-wrap
3805 msgid "Timestamps changes for file-backed mappings"
3806 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
3807
3808 #. type: Plain text
3809 #: build/C/man2/mmap.2:356
3810 msgid ""
3811 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
3812 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
3813 "the first reference to a mapped page will update the field if it has not "
3814 "been already."
3815 msgstr ""
3816 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
3817 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
3818 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
3819 "ページへの最初の参照があった 際に更新される。"
3820
3821 #. type: Plain text
3822 #: build/C/man2/mmap.2:373
3823 msgid ""
3824 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
3825 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
3826 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
3827 "one occurs."
3828 msgstr ""
3829 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
3830 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
3831 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
3832 "B<msync>(2)  が呼ばれる前までに更新される。"
3833
3834 #. type: Plain text
3835 #: build/C/man2/mmap.2:390
3836 msgid ""
3837 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
3838 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
3839 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
3840 "and I<errno> is set (probably to B<EINVAL>)."
3841 msgstr ""
3842 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
3843 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
3844 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
3845 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
3846
3847 #. type: TP
3848 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
3849 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
3850 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
3851 #: build/C/man2/shmop.2:189
3852 #, no-wrap
3853 msgid "B<EACCES>"
3854 msgstr "B<EACCES>"
3855
3856 #. type: Plain text
3857 #: build/C/man2/mmap.2:411
3858 msgid ""
3859 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
3860 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
3861 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
3862 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
3863 msgstr ""
3864 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
3865 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
3866 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
3867 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
3868 "が、ファイルは追加 (append) 専用である。"
3869
3870 #. type: Plain text
3871 #: build/C/man2/mmap.2:415
3872 msgid ""
3873 "The file has been locked, or too much memory has been locked (see "
3874 "B<setrlimit>(2))."
3875 msgstr ""
3876 "ファイルがロックされている。またはロックされているメモリが多すぎる "
3877 "(B<setrlimit>(2)  を参照)。"
3878
3879 #. type: Plain text
3880 #: build/C/man2/mmap.2:421
3881 msgid ""
3882 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
3883 msgstr ""
3884 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
3885 "B<MAP_ANONYMOUS> がセットされていない)。"
3886
3887 #. type: Plain text
3888 #: build/C/man2/mmap.2:429
3889 msgid ""
3890 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
3891 "not aligned on a page boundary)."
3892 msgstr ""
3893 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
3894 "ジ境界にアラインメントされていない)。"
3895
3896 #. type: Plain text
3897 #: build/C/man2/mmap.2:434
3898 msgid "(since Linux 2.6.12)  I<length> was 0."
3899 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
3900
3901 #. type: Plain text
3902 #: build/C/man2/mmap.2:442
3903 msgid ""
3904 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
3905 "both of these values."
3906 msgstr ""
3907 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
3908 "しくは その両方が含まれていた。"
3909
3910 #. type: TP
3911 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
3912 #: build/C/man2/shmget.2:202
3913 #, no-wrap
3914 msgid "B<ENFILE>"
3915 msgstr "B<ENFILE>"
3916
3917 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
3918 #. type: Plain text
3919 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
3920 msgid "The system limit on the total number of open files has been reached."
3921 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
3922
3923 #. type: Plain text
3924 #: build/C/man2/mmap.2:454
3925 msgid ""
3926 "The underlying file system of the specified file does not support memory "
3927 "mapping."
3928 msgstr ""
3929 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
3930 "していない。"
3931
3932 #. type: Plain text
3933 #: build/C/man2/mmap.2:458
3934 msgid ""
3935 "No memory is available, or the process's maximum number of mappings would "
3936 "have been exceeded."
3937 msgstr ""
3938 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
3939
3940 #.  (Since 2.4.25 / 2.6.0.)
3941 #. type: Plain text
3942 #: build/C/man2/mmap.2:467
3943 msgid ""
3944 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
3945 "file on a file system that was mounted no-exec."
3946 msgstr ""
3947 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
3948 "トされたファイルシステム上のファイルに マップ領域が対応している。"
3949
3950 #. type: TP
3951 #: build/C/man2/mmap.2:467
3952 #, no-wrap
3953 msgid "B<ETXTBSY>"
3954 msgstr "B<ETXTBSY>"
3955
3956 #. type: Plain text
3957 #: build/C/man2/mmap.2:473
3958 msgid ""
3959 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
3960 "writing."
3961 msgstr ""
3962 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
3963 "き込み用に開かれている。"
3964
3965 #. type: Plain text
3966 #: build/C/man2/mmap.2:475
3967 msgid "Use of a mapped region can result in these signals:"
3968 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
3969
3970 #. type: TP
3971 #: build/C/man2/mmap.2:475
3972 #, no-wrap
3973 msgid "B<SIGSEGV>"
3974 msgstr "B<SIGSEGV>"
3975
3976 #. type: Plain text
3977 #: build/C/man2/mmap.2:478
3978 msgid "Attempted write into a region mapped as read-only."
3979 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
3980
3981 #. type: TP
3982 #: build/C/man2/mmap.2:478
3983 #, no-wrap
3984 msgid "B<SIGBUS>"
3985 msgstr "B<SIGBUS>"
3986
3987 #. type: Plain text
3988 #: build/C/man2/mmap.2:483
3989 msgid ""
3990 "Attempted access to a portion of the buffer that does not correspond to the "
3991 "file (for example, beyond the end of the file, including the case where "
3992 "another process has truncated the file)."
3993 msgstr ""
3994 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
3995 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
3996 "にアクセスしようとした。"
3997
3998 #.  SVr4 documents additional error codes ENXIO and ENODEV.
3999 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
4000 #. type: Plain text
4001 #: build/C/man2/mmap.2:487
4002 msgid "SVr4, 4.4BSD, POSIX.1-2001."
4003 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
4004
4005 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4006 #.  -1: unavailable, 0: ask using sysconf().
4007 #.  glibc defines it to 1.
4008 #. type: Plain text
4009 #: build/C/man2/mmap.2:501
4010 msgid ""
4011 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
4012 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
4013 "value greater than 0.  (See also B<sysconf>(3).)"
4014 msgstr ""
4015 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
4016 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
4017 "(B<sysconf>(3)  も参照のこと)。"
4018
4019 #.  Since around glibc 2.1/2.2, depending on the platform.
4020 #. type: Plain text
4021 #: build/C/man2/mmap.2:516
4022 msgid ""
4023 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
4024 "function.  Originally, this function invoked a system call of the same "
4025 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
4026 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
4027 "with a suitably adjusted value for I<offset>."
4028 msgstr ""
4029 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
4030 "に\n"
4031 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
4032 "た。\n"
4033 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
4034 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
4035 "B<mmap2>(2) を起動する。"
4036
4037 #. type: Plain text
4038 #: build/C/man2/mmap.2:529
4039 msgid ""
4040 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
4041 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
4042 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
4043 "they intend to execute code in the new mapping."
4044 msgstr ""
4045 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
4046 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
4047 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
4048 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
4049 "常に B<PROT_EXEC> をセットすべきである。"
4050
4051 #. type: Plain text
4052 #: build/C/man2/mmap.2:544
4053 msgid ""
4054 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
4055 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
4056 "address for the mapping; the address is chosen so as not to conflict with "
4057 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
4058 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
4059 msgstr ""
4060 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
4061 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
4062 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
4063 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
4064 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
4065
4066 #. type: Plain text
4067 #: build/C/man2/mmap.2:549
4068 msgid ""
4069 "On Linux there are no guarantees like those suggested above under "
4070 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
4071 "the system runs out of memory."
4072 msgstr ""
4073 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
4074 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
4075 "終了されるか分からないからである。"
4076
4077 #. type: Plain text
4078 #: build/C/man2/mmap.2:556
4079 msgid ""
4080 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
4081 "is specified as B<PROT_NONE>."
4082 msgstr ""
4083 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
4084 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
4085
4086 #. type: Plain text
4087 #: build/C/man2/mmap.2:571
4088 msgid ""
4089 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
4090 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
4091 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
4092 "fails with the error B<EINVAL> for this case."
4093 msgstr ""
4094 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
4095 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
4096 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
4097 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
4098
4099 #. type: Plain text
4100 #: build/C/man2/mmap.2:583
4101 msgid ""
4102 "The following program prints part of the file specified in its first command-"
4103 "line argument to standard output.  The range of bytes to be printed is "
4104 "specified via offset and length values in the second and third command-line "
4105 "arguments.  The program creates a memory mapping of the required pages of "
4106 "the file and then uses B<write>(2)  to output the desired bytes."
4107 msgstr ""
4108 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
4109 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
4110 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
4111 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
4112 "を出力する。"
4113
4114 #. type: Plain text
4115 #: build/C/man2/mmap.2:591
4116 #, no-wrap
4117 msgid ""
4118 "#include E<lt>sys/mman.hE<gt>\n"
4119 "#include E<lt>sys/stat.hE<gt>\n"
4120 "#include E<lt>fcntl.hE<gt>\n"
4121 "#include E<lt>stdio.hE<gt>\n"
4122 "#include E<lt>stdlib.hE<gt>\n"
4123 "#include E<lt>unistd.hE<gt>\n"
4124 msgstr ""
4125 "#include E<lt>sys/mman.hE<gt>\n"
4126 "#include E<lt>sys/stat.hE<gt>\n"
4127 "#include E<lt>fcntl.hE<gt>\n"
4128 "#include E<lt>stdio.hE<gt>\n"
4129 "#include E<lt>stdlib.hE<gt>\n"
4130 "#include E<lt>unistd.hE<gt>\n"
4131
4132 #. type: Plain text
4133 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
4134 #, no-wrap
4135 msgid ""
4136 "#define handle_error(msg) \\e\n"
4137 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4138 msgstr ""
4139 "#define handle_error(msg) \\e\n"
4140 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4141
4142 #. type: Plain text
4143 #: build/C/man2/mmap.2:604
4144 #, no-wrap
4145 msgid ""
4146 "int\n"
4147 "main(int argc, char *argv[])\n"
4148 "{\n"
4149 "    char *addr;\n"
4150 "    int fd;\n"
4151 "    struct stat sb;\n"
4152 "    off_t offset, pa_offset;\n"
4153 "    size_t length;\n"
4154 "    ssize_t s;\n"
4155 msgstr ""
4156 "int\n"
4157 "main(int argc, char *argv[])\n"
4158 "{\n"
4159 "    char *addr;\n"
4160 "    int fd;\n"
4161 "    struct stat sb;\n"
4162 "    off_t offset, pa_offset;\n"
4163 "    size_t length;\n"
4164 "    ssize_t s;\n"
4165
4166 #. type: Plain text
4167 #: build/C/man2/mmap.2:609
4168 #, no-wrap
4169 msgid ""
4170 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
4171 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4172 "        exit(EXIT_FAILURE);\n"
4173 "    }\n"
4174 msgstr ""
4175 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
4176 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4177 "        exit(EXIT_FAILURE);\n"
4178 "    }\n"
4179
4180 #. type: Plain text
4181 #: build/C/man2/mmap.2:613
4182 #, no-wrap
4183 msgid ""
4184 "    fd = open(argv[1], O_RDONLY);\n"
4185 "    if (fd == -1)\n"
4186 "        handle_error(\"open\");\n"
4187 msgstr ""
4188 "    fd = open(argv[1], O_RDONLY);\n"
4189 "    if (fd == -1)\n"
4190 "        handle_error(\"open\");\n"
4191
4192 #. type: Plain text
4193 #: build/C/man2/mmap.2:616
4194 #, no-wrap
4195 msgid ""
4196 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
4197 "        handle_error(\"fstat\");\n"
4198 msgstr ""
4199 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
4200 "        handle_error(\"fstat\");\n"
4201
4202 #. type: Plain text
4203 #: build/C/man2/mmap.2:620
4204 #, no-wrap
4205 msgid ""
4206 "    offset = atoi(argv[2]);\n"
4207 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4208 "        /* offset for mmap() must be page aligned */\n"
4209 msgstr ""
4210 "    offset = atoi(argv[2]);\n"
4211 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4212 "        /* offset for mmap() must be page aligned */\n"
4213
4214 #. type: Plain text
4215 #: build/C/man2/mmap.2:625
4216 #, no-wrap
4217 msgid ""
4218 "    if (offset E<gt>= sb.st_size) {\n"
4219 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
4220 "        exit(EXIT_FAILURE);\n"
4221 "    }\n"
4222 msgstr ""
4223 "    if (offset E<gt>= sb.st_size) {\n"
4224 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
4225 "        exit(EXIT_FAILURE);\n"
4226 "    }\n"
4227
4228 #. type: Plain text
4229 #: build/C/man2/mmap.2:631
4230 #, no-wrap
4231 msgid ""
4232 "    if (argc == 4) {\n"
4233 "        length = atoi(argv[3]);\n"
4234 "        if (offset + length E<gt> sb.st_size)\n"
4235 "            length = sb.st_size - offset;\n"
4236 "                /* Can\\(aqt display bytes past end of file */\n"
4237 msgstr ""
4238 "    if (argc == 4) {\n"
4239 "        length = atoi(argv[3]);\n"
4240 "        if (offset + length E<gt> sb.st_size)\n"
4241 "            length = sb.st_size - offset;\n"
4242 "                /* Can\\(aqt display bytes past end of file */\n"
4243
4244 #. type: Plain text
4245 #: build/C/man2/mmap.2:635
4246 #, no-wrap
4247 msgid ""
4248 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
4249 "        length = sb.st_size - offset;\n"
4250 "    }\n"
4251 msgstr ""
4252 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
4253 "        length = sb.st_size - offset;\n"
4254 "    }\n"
4255
4256 #. type: Plain text
4257 #: build/C/man2/mmap.2:640
4258 #, no-wrap
4259 msgid ""
4260 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4261 "                MAP_PRIVATE, fd, pa_offset);\n"
4262 "    if (addr == MAP_FAILED)\n"
4263 "        handle_error(\"mmap\");\n"
4264 msgstr ""
4265 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4266 "                MAP_PRIVATE, fd, pa_offset);\n"
4267 "    if (addr == MAP_FAILED)\n"
4268 "        handle_error(\"mmap\");\n"
4269
4270 #. type: Plain text
4271 #: build/C/man2/mmap.2:645
4272 #, no-wrap
4273 msgid ""
4274 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4275 "    if (s != length) {\n"
4276 "        if (s == -1)\n"
4277 "            handle_error(\"write\");\n"
4278 msgstr ""
4279 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4280 "    if (s != length) {\n"
4281 "        if (s == -1)\n"
4282 "            handle_error(\"write\");\n"
4283
4284 #. type: Plain text
4285 #: build/C/man2/mmap.2:649
4286 #, no-wrap
4287 msgid ""
4288 "        fprintf(stderr, \"partial write\");\n"
4289 "        exit(EXIT_FAILURE);\n"
4290 "    }\n"
4291 msgstr ""
4292 "        fprintf(stderr, \"partial write\");\n"
4293 "        exit(EXIT_FAILURE);\n"
4294 "    }\n"
4295
4296 #. type: Plain text
4297 #: build/C/man2/mmap.2:666
4298 msgid ""
4299 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4300 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4301 "(2), B<shm_open>(3), B<shm_overview>(7)"
4302 msgstr ""
4303 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4304 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4305 "(2), B<shm_open>(3), B<shm_overview>(7)"
4306
4307 #. type: Plain text
4308 #: build/C/man2/mmap.2:671 build/C/man2/msync.2:122
4309 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4310 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4311
4312 #. type: TH
4313 #: build/C/man2/mmap2.2:29
4314 #, no-wrap
4315 msgid "MMAP2"
4316 msgstr "MMAP2"
4317
4318 #. type: Plain text
4319 #: build/C/man2/mmap2.2:32
4320 msgid "mmap2 - map files or devices into memory"
4321 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
4322
4323 #. type: Plain text
4324 #: build/C/man2/mmap2.2:38
4325 #, no-wrap
4326 msgid ""
4327 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4328 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4329 msgstr ""
4330 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4331 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4332
4333 #. type: Plain text
4334 #: build/C/man2/mmap2.2:43
4335 msgid ""
4336 "This is probably not the system call you are interested; instead, see B<mmap>"
4337 "(2), which describes the glibc wrapper function that invokes this system "
4338 "call."
4339 msgstr ""
4340 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
4341 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
4342 "の\n"
4343 "ラッパー関数についての説明がある。"
4344
4345 #. type: Plain text
4346 #: build/C/man2/mmap2.2:54
4347 msgid ""
4348 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
4349 "except that the final argument specifies the offset into the file in 4096-"
4350 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
4351 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
4352 "bytes)."
4353 msgstr ""
4354 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
4355 "だ\n"
4356 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
4357 "ト\n"
4358 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
4359 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
4360 "プ\n"
4361 "できるようになる。"
4362
4363 #. type: Plain text
4364 #: build/C/man2/mmap2.2:61
4365 msgid ""
4366 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
4367 "is returned and I<errno> is set appropriately."
4368 msgstr ""
4369 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
4370 "合は -1 が返されて、 I<errno> が適切に設定される。"
4371
4372 #. type: Plain text
4373 #: build/C/man2/mmap2.2:65
4374 msgid "Problem with getting the data from userspace."
4375 msgstr "ユーザ空間からデータを取得するときに問題があった。"
4376
4377 #. type: Plain text
4378 #: build/C/man2/mmap2.2:70
4379 msgid ""
4380 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
4381 "is not a multiple of the system page size."
4382 msgstr ""
4383 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
4384 "がシステムのページサイズの倍数ではない。"
4385
4386 #. type: Plain text
4387 #: build/C/man2/mmap2.2:74
4388 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
4389 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
4390
4391 #. type: Plain text
4392 #: build/C/man2/mmap2.2:77
4393 msgid "B<mmap2>()  is available since Linux 2.3.31."
4394 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
4395
4396 #. type: Plain text
4397 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
4398 msgid "This system call is Linux-specific."
4399 msgstr "このシステムコールは Linux 独自である。"
4400
4401 #. type: Plain text
4402 #: build/C/man2/mmap2.2:85
4403 msgid ""
4404 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
4405 "rather than the B<mmap>(2)  system call."
4406 msgstr ""
4407 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
4408 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
4409
4410 #.  ia64 can have page sizes ranging from 4kB to 64kB.
4411 #.  On cris, it looks like the unit might also be the page size,
4412 #.  which is 8192 bytes. -- mtk, June 2007
4413 #. type: Plain text
4414 #: build/C/man2/mmap2.2:92
4415 msgid ""
4416 "On ia64, the unit for I<offset> is actually the system page size, rather "
4417 "than 4096 bytes."
4418 msgstr ""
4419 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
4420 "バイトではない。"
4421
4422 #. type: Plain text
4423 #: build/C/man2/mmap2.2:98
4424 msgid ""
4425 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4426 msgstr ""
4427 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4428
4429 #. type: TH
4430 #: build/C/man2/mprotect.2:32
4431 #, no-wrap
4432 msgid "MPROTECT"
4433 msgstr "MPROTECT"
4434
4435 #. type: TH
4436 #: build/C/man2/mprotect.2:32
4437 #, no-wrap
4438 msgid "2011-09-08"
4439 msgstr "2011-09-08"
4440
4441 #. type: Plain text
4442 #: build/C/man2/mprotect.2:35
4443 msgid "mprotect - set protection on a region of memory"
4444 msgstr "mprotect - メモリ領域の保護を設定する"
4445
4446 #. type: Plain text
4447 #: build/C/man2/mprotect.2:40
4448 #, no-wrap
4449 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4450 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4451
4452 #. type: Plain text
4453 #: build/C/man2/mprotect.2:48
4454 msgid ""
4455 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
4456 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
4457 "+I<len>-1].  I<addr> must be aligned to a page boundary."
4458 msgstr ""
4459 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
4460 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
4461 "界に一致していなければならない。"
4462
4463 #. type: Plain text
4464 #: build/C/man2/mprotect.2:53
4465 msgid ""
4466 "If the calling process tries to access memory in a manner that violates the "
4467 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
4468 msgstr ""
4469 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
4470 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
4471
4472 #. type: Plain text
4473 #: build/C/man2/mprotect.2:58
4474 msgid ""
4475 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
4476 "following list:"
4477 msgstr ""
4478 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
4479 "毎の論理和 (bitwize-or) で指定する:"
4480
4481 #. type: Plain text
4482 #: build/C/man2/mprotect.2:61
4483 msgid "The memory cannot be accessed at all."
4484 msgstr "そのメモリには全くアクセスできない。"
4485
4486 #. type: Plain text
4487 #: build/C/man2/mprotect.2:64
4488 msgid "The memory can be read."
4489 msgstr "そのメモリを読み取ることができる。"
4490
4491 #. type: Plain text
4492 #: build/C/man2/mprotect.2:67
4493 msgid "The memory can be modified."
4494 msgstr "そのメモリを変更できる。"
4495
4496 #.  FIXME
4497 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
4498 #. type: Plain text
4499 #: build/C/man2/mprotect.2:72
4500 msgid "The memory can be executed."
4501 msgstr "そのメモリは実行可能である。"
4502
4503 #. type: Plain text
4504 #: build/C/man2/mprotect.2:79
4505 msgid ""
4506 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
4507 "I<errno> is set appropriately."
4508 msgstr ""
4509 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
4510 "I<errno> が適切に設定される。"
4511
4512 #. type: Plain text
4513 #: build/C/man2/mprotect.2:89
4514 msgid ""
4515 "The memory cannot be given the specified access.  This can happen, for "
4516 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
4517 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
4518 msgstr ""
4519 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
4520 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
4521 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
4522
4523 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
4524 #. type: Plain text
4525 #: build/C/man2/mprotect.2:94
4526 msgid ""
4527 "I<addr> is not a valid pointer, or not a multiple of the system page size."
4528 msgstr ""
4529 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
4530
4531 #. type: Plain text
4532 #: build/C/man2/mprotect.2:97
4533 msgid "Internal kernel structures could not be allocated."
4534 msgstr "カーネル内部の構造体を割り当てることができなかった。"
4535
4536 #. type: Plain text
4537 #: build/C/man2/mprotect.2:107
4538 msgid ""
4539 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
4540 "address space of the process, or specify one or more pages that are not "
4541 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
4542 "for these cases.)"
4543 msgstr ""
4544 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
4545 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
4546 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
4547 "成されていた)。"
4548
4549 #.  SVr4 defines an additional error
4550 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
4551 #. type: Plain text
4552 #: build/C/man2/mprotect.2:116
4553 msgid ""
4554 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
4555 "unspecified if it is applied to a region of memory that was not obtained via "
4556 "B<mmap>(2)."
4557 msgstr ""
4558 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
4559 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
4560 "されている。"
4561
4562 #. type: Plain text
4563 #: build/C/man2/mprotect.2:123
4564 msgid ""
4565 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
4566 "process's address space (except for the kernel vsyscall area).  In "
4567 "particular it can be used to change existing code mappings to be writable."
4568 msgstr ""
4569 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
4570 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
4571 "マッピングを書き込み可能にするために使われる。"
4572
4573 #. type: Plain text
4574 #: build/C/man2/mprotect.2:133
4575 msgid ""
4576 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
4577 "architecture- and kernel version-dependent.  On some hardware architectures "
4578 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
4579 msgstr ""
4580 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
4581 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
4582 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
4583
4584 #. type: Plain text
4585 #: build/C/man2/mprotect.2:142
4586 msgid ""
4587 "POSIX.1-2001 says that an implementation may permit access other than that "
4588 "specified in I<prot>, but at a minimum can only allow write access if "
4589 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
4590 "has been set."
4591 msgstr ""
4592 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
4593 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
4594 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
4595 "ない点だけは 満たす必要がある。"
4596
4597 #. type: Plain text
4598 #: build/C/man2/mprotect.2:148
4599 msgid ""
4600 "The program below allocates four pages of memory, makes the third of these "
4601 "pages read-only, and then executes a loop that walks upward through the "
4602 "allocated region modifying bytes."
4603 msgstr ""
4604 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
4605 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
4606 "かって順番にバイト値を変更するループを実行する。"
4607
4608 #. type: Plain text
4609 #: build/C/man2/mprotect.2:151
4610 msgid ""
4611 "An example of what we might see when running the program is the following:"
4612 msgstr "プログラムを実行した場合の一例を以下に示す。"
4613
4614 #. type: Plain text
4615 #: build/C/man2/mprotect.2:157
4616 #, no-wrap
4617 msgid ""
4618 "$B< ./a.out>\n"
4619 "Start of region:        0x804c000\n"
4620 "Got SIGSEGV at address: 0x804e000\n"
4621 msgstr ""
4622 "$B< ./a.out>\n"
4623 "Start of region:        0x804c000\n"
4624 "Got SIGSEGV at address: 0x804e000\n"
4625
4626 #. type: Plain text
4627 #: build/C/man2/mprotect.2:169
4628 #, no-wrap
4629 msgid ""
4630 "#include E<lt>unistd.hE<gt>\n"
4631 "#include E<lt>signal.hE<gt>\n"
4632 "#include E<lt>stdio.hE<gt>\n"
4633 "#include E<lt>malloc.hE<gt>\n"
4634 "#include E<lt>stdlib.hE<gt>\n"
4635 "#include E<lt>errno.hE<gt>\n"
4636 "#include E<lt>sys/mman.hE<gt>\n"
4637 msgstr ""
4638 "#include E<lt>unistd.hE<gt>\n"
4639 "#include E<lt>signal.hE<gt>\n"
4640 "#include E<lt>stdio.hE<gt>\n"
4641 "#include E<lt>malloc.hE<gt>\n"
4642 "#include E<lt>stdlib.hE<gt>\n"
4643 "#include E<lt>errno.hE<gt>\n"
4644 "#include E<lt>sys/mman.hE<gt>\n"
4645
4646 #. type: Plain text
4647 #: build/C/man2/mprotect.2:174
4648 #, no-wrap
4649 msgid "char *buffer;\n"
4650 msgstr "char *buffer;\n"
4651
4652 #. type: Plain text
4653 #: build/C/man2/mprotect.2:182
4654 #, no-wrap
4655 msgid ""
4656 "static void\n"
4657 "handler(int sig, siginfo_t *si, void *unused)\n"
4658 "{\n"
4659 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4660 "            (long) si-E<gt>si_addr);\n"
4661 "    exit(EXIT_FAILURE);\n"
4662 "}\n"
4663 msgstr ""
4664 "static void\n"
4665 "handler(int sig, siginfo_t *si, void *unused)\n"
4666 "{\n"
4667 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
4668 "            (long) si-E<gt>si_addr);\n"
4669 "    exit(EXIT_FAILURE);\n"
4670 "}\n"
4671
4672 #. type: Plain text
4673 #: build/C/man2/mprotect.2:189
4674 #, no-wrap
4675 msgid ""
4676 "int\n"
4677 "main(int argc, char *argv[])\n"
4678 "{\n"
4679 "    char *p;\n"
4680 "    int pagesize;\n"
4681 "    struct sigaction sa;\n"
4682 msgstr ""
4683 "int\n"
4684 "main(void)\n"
4685 "{\n"
4686 "    char *p;\n"
4687 "    int pagesize;\n"
4688 "    struct sigaction sa;\n"
4689
4690 #. type: Plain text
4691 #: build/C/man2/mprotect.2:195
4692 #, no-wrap
4693 msgid ""
4694 "    sa.sa_flags = SA_SIGINFO;\n"
4695 "    sigemptyset(&sa.sa_mask);\n"
4696 "    sa.sa_sigaction = handler;\n"
4697 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4698 "        handle_error(\"sigaction\");\n"
4699 msgstr ""
4700 "    sa.sa_flags = SA_SIGINFO;\n"
4701 "    sigemptyset(&sa.sa_mask);\n"
4702 "    sa.sa_sigaction = handler;\n"
4703 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
4704 "        handle_error(\"sigaction\");\n"
4705
4706 #. type: Plain text
4707 #: build/C/man2/mprotect.2:199
4708 #, no-wrap
4709 msgid ""
4710 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
4711 "    if (pagesize == -1)\n"
4712 "        handle_error(\"sysconf\");\n"
4713 msgstr ""
4714 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
4715 "    if (pagesize == -1)\n"
4716 "        handle_error(\"sysconf\");\n"
4717
4718 #. type: Plain text
4719 #: build/C/man2/mprotect.2:202
4720 #, no-wrap
4721 msgid ""
4722 "    /* Allocate a buffer aligned on a page boundary;\n"
4723 "       initial protection is PROT_READ | PROT_WRITE */\n"
4724 msgstr ""
4725 "    /* Allocate a buffer aligned on a page boundary;\n"
4726 "       initial protection is PROT_READ | PROT_WRITE */\n"
4727
4728 #. type: Plain text
4729 #: build/C/man2/mprotect.2:206
4730 #, no-wrap
4731 msgid ""
4732 "    buffer = memalign(pagesize, 4 * pagesize);\n"
4733 "    if (buffer == NULL)\n"
4734 "        handle_error(\"memalign\");\n"
4735 msgstr ""
4736 "    buffer = memalign(pagesize, 4 * pagesize);\n"
4737 "    if (buffer == NULL)\n"
4738 "        handle_error(\"memalign\");\n"
4739
4740 #. type: Plain text
4741 #: build/C/man2/mprotect.2:208
4742 #, no-wrap
4743 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
4744 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
4745
4746 #. type: Plain text
4747 #: build/C/man2/mprotect.2:212
4748 #, no-wrap
4749 msgid ""
4750 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
4751 "                PROT_READ) == -1)\n"
4752 "        handle_error(\"mprotect\");\n"
4753 msgstr ""
4754 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
4755 "                PROT_READ) == -1)\n"
4756 "        handle_error(\"mprotect\");\n"
4757
4758 #. type: Plain text
4759 #: build/C/man2/mprotect.2:215
4760 #, no-wrap
4761 msgid ""
4762 "    for (p = buffer ; ; )\n"
4763 "        *(p++) = \\(aqa\\(aq;\n"
4764 msgstr ""
4765 "    for (p = buffer ; ; )\n"
4766 "        *(p++) = \\(aqa\\(aq;\n"
4767
4768 #. type: Plain text
4769 #: build/C/man2/mprotect.2:219
4770 #, no-wrap
4771 msgid ""
4772 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
4773 "    exit(EXIT_SUCCESS);\n"
4774 "}\n"
4775 msgstr ""
4776 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
4777 "    exit(EXIT_SUCCESS);\n"
4778 "}\n"
4779
4780 #. type: Plain text
4781 #: build/C/man2/mprotect.2:223
4782 msgid "B<mmap>(2), B<sysconf>(3)"
4783 msgstr "B<mmap>(2), B<sysconf>(3)"
4784
4785 #. type: TH
4786 #: build/C/man2/mremap.2:31
4787 #, no-wrap
4788 msgid "MREMAP"
4789 msgstr "MREMAP"
4790
4791 #. type: TH
4792 #: build/C/man2/mremap.2:31
4793 #, no-wrap
4794 msgid "2010-06-10"
4795 msgstr "2010-06-10"
4796
4797 #. type: Plain text
4798 #: build/C/man2/mremap.2:34
4799 msgid "mremap - remap a virtual memory address"
4800 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
4801
4802 #. type: Plain text
4803 #: build/C/man2/mremap.2:37
4804 #, no-wrap
4805 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
4806 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
4807
4808 #. type: Plain text
4809 #: build/C/man2/mremap.2:42
4810 #, no-wrap
4811 msgid ""
4812 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4813 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4814 msgstr ""
4815 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
4816 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
4817
4818 #. type: Plain text
4819 #: build/C/man2/mremap.2:48
4820 msgid ""
4821 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
4822 "moving it at the same time (controlled by the I<flags> argument and the "
4823 "available virtual address space)."
4824 msgstr ""
4825 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
4826 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
4827 "る)。"
4828
4829 #. type: Plain text
4830 #: build/C/man2/mremap.2:62
4831 msgid ""
4832 "I<old_address> is the old address of the virtual memory block that you want "
4833 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
4834 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
4835 "requested size of the virtual memory block after the resize.  An optional "
4836 "fifth argument, I<new_address>, may be provided; see the description of "
4837 "B<MREMAP_FIXED> below."
4838 msgstr ""
4839 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
4840 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
4841 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
4842 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
4843 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
4844 "明を参照のこと。"
4845
4846 #. type: Plain text
4847 #: build/C/man2/mremap.2:74
4848 msgid ""
4849 "In Linux the memory is divided into pages.  A user process has (one or)  "
4850 "several linear virtual memory segments.  Each virtual memory segment has one "
4851 "or more mappings to real memory pages (in the page table).  Each virtual "
4852 "memory segment has its own protection (access rights), which may cause a "
4853 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
4854 "to a read-only segment).  Accessing virtual memory outside of the segments "
4855 "will also cause a segmentation violation."
4856 msgstr ""
4857 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
4858 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
4859 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
4860 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
4861 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
4862 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
4863 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
4864 "ン侵害が発生する。"
4865
4866 #. type: Plain text
4867 #: build/C/man2/mremap.2:82
4868 msgid ""
4869 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
4870 "mapping between virtual addresses and memory pages.  This can be used to "
4871 "implement a very efficient B<realloc>(3)."
4872 msgstr ""
4873 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
4874 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
4875 "B<realloc>(3)  を実装するのに使用されている。"
4876
4877 #. type: Plain text
4878 #: build/C/man2/mremap.2:84
4879 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
4880 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
4881
4882 #. type: TP
4883 #: build/C/man2/mremap.2:84
4884 #, no-wrap
4885 msgid "B<MREMAP_MAYMOVE>"
4886 msgstr "B<MREMAP_MAYMOVE>"
4887
4888 #. type: Plain text
4889 #: build/C/man2/mremap.2:96
4890 msgid ""
4891 "By default, if there is not sufficient space to expand a mapping at its "
4892 "current location, then B<mremap>()  fails.  If this flag is specified, then "
4893 "the kernel is permitted to relocate the mapping to a new virtual address, if "
4894 "necessary.  If the mapping is relocated, then absolute pointers into the old "
4895 "mapping location become invalid (offsets relative to the starting address of "
4896 "the mapping should be employed)."
4897 msgstr ""
4898 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
4899 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
4900 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
4901 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
4902 "レスからの相対オフセットは有効のままである)。"
4903
4904 #. type: TP
4905 #: build/C/man2/mremap.2:96
4906 #, no-wrap
4907 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
4908 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
4909
4910 #. type: Plain text
4911 #: build/C/man2/mremap.2:118
4912 msgid ""
4913 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
4914 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
4915 "I<void *new_address>, which specifies a page-aligned address to which the "
4916 "mapping must be moved.  Any previous mapping at the address range specified "
4917 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
4918 "specified, then B<MREMAP_MAYMOVE> must also be specified."
4919 msgstr ""
4920 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
4921 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
4922 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
4923 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
4924 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
4925 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
4926 "B<MREMAP_MAYMOVE> も指定しなければならない。"
4927
4928 #. type: Plain text
4929 #: build/C/man2/mremap.2:128
4930 msgid ""
4931 "If the memory segment specified by I<old_address> and I<old_size> is locked "
4932 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
4933 "segment is resized and/or relocated.  As a consequence, the amount of memory "
4934 "locked by the process may change."
4935 msgstr ""
4936 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
4937 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
4938 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
4939 "の量は変化する。"
4940
4941 #. type: Plain text
4942 #: build/C/man2/mremap.2:136
4943 msgid ""
4944 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
4945 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
4946 "and I<errno> is set appropriately."
4947 msgstr ""
4948 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
4949 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
4950 "切に設定される。"
4951
4952 #. type: Plain text
4953 #: build/C/man2/mremap.2:143
4954 msgid ""
4955 "The caller tried to expand a memory segment that is locked, but this was not "
4956 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
4957 msgstr ""
4958 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
4959 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
4960
4961 #. type: Plain text
4962 #: build/C/man2/mremap.2:152
4963 msgid ""
4964 "\"Segmentation fault.\" Some address in the range I<old_address> to "
4965 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
4966 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
4967 "the whole address space requested, but those mappings are of different types."
4968 msgstr ""
4969 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
4970 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
4971 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
4972 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
4973 "を受け取るだろう。"
4974
4975 #. type: Plain text
4976 #: build/C/man2/mremap.2:180
4977 msgid ""
4978 "An invalid argument was given.  Possible causes are: I<old_address> was not "
4979 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
4980 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
4981 "was invalid; or the new address range specified by I<new_address> and "
4982 "I<new_size> overlapped the old address range specified by I<old_address> and "
4983 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
4984 "B<MREMAP_MAYMOVE>."
4985 msgstr ""
4986 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
4987 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
4988 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
4989 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
4990 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
4991 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
4992 "されていない。"
4993
4994 #. type: Plain text
4995 #: build/C/man2/mremap.2:186
4996 msgid ""
4997 "The memory area cannot be expanded at the current virtual address, and the "
4998 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
4999 "(virtual) memory available."
5000 msgstr ""
5001 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
5002 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
5003
5004 #.  4.2BSD had a (never actually implemented)
5005 #.  .BR mremap (2)
5006 #.  call with completely different semantics.
5007 #. type: Plain text
5008 #: build/C/man2/mremap.2:192
5009 msgid ""
5010 "This call is Linux-specific, and should not be used in programs intended to "
5011 "be portable."
5012 msgstr ""
5013 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
5014 "い。"
5015
5016 #. type: Plain text
5017 #: build/C/man2/mremap.2:200
5018 msgid ""
5019 "Prior to version 2.4, glibc did not expose the definition of "
5020 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
5021 "I<new_address> argument."
5022 msgstr ""
5023 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
5024 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
5025
5026 #. type: Plain text
5027 #: build/C/man2/mremap.2:209
5028 msgid ""
5029 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5030 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
5031 msgstr ""
5032 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5033 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
5034
5035 #. type: Plain text
5036 #: build/C/man2/mremap.2:214
5037 msgid ""
5038 "Your favorite OS text book for more information on paged memory.  (I<Modern "
5039 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
5040 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
5041 msgstr ""
5042 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
5043 "の\n"
5044 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
5045 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
5046 "System> by Maurice J. Bach.)"
5047
5048 #. type: TH
5049 #: build/C/man2/msync.2:25
5050 #, no-wrap
5051 msgid "MSYNC"
5052 msgstr "MSYNC"
5053
5054 #. type: TH
5055 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
5056 #, no-wrap
5057 msgid "2008-04-22"
5058 msgstr "2008-04-22"
5059
5060 #. type: Plain text
5061 #: build/C/man2/msync.2:28
5062 msgid "msync - synchronize a file with a memory map"
5063 msgstr "msync - ファイルをマップしたメモリと同期させる"
5064
5065 #. type: Plain text
5066 #: build/C/man2/msync.2:32
5067 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5068 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5069
5070 #. type: Plain text
5071 #: build/C/man2/msync.2:48
5072 msgid ""
5073 "B<msync>()  flushes changes made to the in-core copy of a file that was "
5074 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
5075 "there is no guarantee that changes are written back before B<munmap>(2)  is "
5076 "called.  To be more precise, the part of the file that corresponds to the "
5077 "memory area starting at I<addr> and having length I<length> is updated."
5078 msgstr ""
5079 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
5080 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
5081 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
5082 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
5083 "更新される。"
5084
5085 #. type: Plain text
5086 #: build/C/man2/msync.2:68
5087 msgid ""
5088 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
5089 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
5090 "specifies that an update be scheduled, but the call returns immediately.  "
5091 "B<MS_SYNC> asks for an update and waits for it to complete.  "
5092 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
5093 "they can be updated with the fresh values just written)."
5094 msgstr ""
5095 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
5096 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
5097 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
5098 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
5099 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
5100 "に対する他のマッピングを無効にすることを要求する。"
5101
5102 #. type: Plain text
5103 #: build/C/man2/msync.2:73
5104 msgid ""
5105 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5106 "appropriately."
5107 msgstr ""
5108 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
5109 "る。"
5110
5111 #. type: TP
5112 #: build/C/man2/msync.2:74
5113 #, no-wrap
5114 msgid "B<EBUSY>"
5115 msgstr "B<EBUSY>"
5116
5117 #. type: Plain text
5118 #: build/C/man2/msync.2:80
5119 msgid ""
5120 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
5121 "specified address range."
5122 msgstr ""
5123 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
5124 "存在する。"
5125
5126 #. type: Plain text
5127 #: build/C/man2/msync.2:93
5128 msgid ""
5129 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
5130 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
5131 "B<MS_ASYNC> are set in I<flags>."
5132 msgstr ""
5133 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
5134 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
5135 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
5136
5137 #. type: Plain text
5138 #: build/C/man2/msync.2:96
5139 msgid "The indicated memory (or part of it) was not mapped."
5140 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
5141
5142 #. type: Plain text
5143 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
5144 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
5145 msgid "POSIX.1-2001."
5146 msgstr "POSIX.1-2001."
5147
5148 #. type: Plain text
5149 #: build/C/man2/msync.2:105
5150 msgid ""
5151 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
5152 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
5153 msgstr ""
5154 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
5155 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
5156
5157 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5158 #.  -1: unavailable, 0: ask using sysconf().
5159 #.  glibc defines them to 1.
5160 #. type: Plain text
5161 #: build/C/man2/msync.2:118
5162 msgid ""
5163 "On POSIX systems on which B<msync>()  is available, both "
5164 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
5165 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
5166 msgstr ""
5167 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
5168 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
5169 "定義される。 (B<sysconf>(3)  を参照すること。 )"
5170
5171 #. type: TP
5172 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
5173 #, no-wrap
5174 msgid "B<mmap>(2)"
5175 msgstr "B<mmap>(2)"
5176
5177 #. type: TH
5178 #: build/C/man3/mtrace.3:23
5179 #, no-wrap
5180 msgid "MTRACE"
5181 msgstr "MTRACE"
5182
5183 #. type: Plain text
5184 #: build/C/man3/mtrace.3:26
5185 msgid "mtrace, muntrace - malloc tracing"
5186 msgstr "mtrace, muntrace - malloc のトレース"
5187
5188 #. type: Plain text
5189 #: build/C/man3/mtrace.3:28
5190 msgid "B<#include E<lt>mcheck.hE<gt>>"
5191 msgstr "B<#include E<lt>mcheck.hE<gt>>"
5192
5193 #. type: Plain text
5194 #: build/C/man3/mtrace.3:30
5195 msgid "B<void mtrace(void);>"
5196 msgstr "B<void mtrace(void);>"
5197
5198 #. type: Plain text
5199 #: build/C/man3/mtrace.3:32
5200 msgid "B<void muntrace(void);>"
5201 msgstr "B<void muntrace(void);>"
5202
5203 #. type: Plain text
5204 #: build/C/man3/mtrace.3:44
5205 msgid ""
5206 "The B<mtrace>()  function installs hook functions for the memory-allocation "
5207 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
5208 "hook functions record tracing information about memory allocation and "
5209 "deallocation.  The tracing information can be used to discover memory leaks "
5210 "and attempts to free nonallocated memory in a program."
5211 msgstr ""
5212
5213 #. type: Plain text
5214 #: build/C/man3/mtrace.3:55
5215 msgid ""
5216 "The B<muntrace>()  function disables the hook functions installed by "
5217 "B<mtrace>(), so that tracing information is no longer recorded for the "
5218 "memory-allocation functions.  If no hook functions were successfully "
5219 "installed by B<mtrace>(), B<muntrace>()  does nothing."
5220 msgstr ""
5221
5222 #. type: Plain text
5223 #: build/C/man3/mtrace.3:63
5224 msgid ""
5225 "When B<mtrace>(3)  is called, it checks the value of the environment "
5226 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
5227 "which the tracing information is to be recorded.  If the pathname is "
5228 "successfully opened, it is truncated to zero length."
5229 msgstr ""
5230
5231 #. type: Plain text
5232 #: build/C/man3/mtrace.3:76
5233 msgid ""
5234 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
5235 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
5236 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
5237 "ignored, and B<mtrace>()  has no effect."
5238 msgstr ""
5239
5240 #. type: Plain text
5241 #: build/C/man3/mtrace.3:84
5242 msgid ""
5243 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
5244 "program, and B<muntrace>()  is never called."
5245 msgstr ""
5246
5247 #. type: Plain text
5248 #: build/C/man3/mtrace.3:94
5249 msgid ""
5250 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
5251 "designed to be human readable.  The GNU C library provides a Perl script, "
5252 "B<mtrace>(1), that interprets the trace log and produces human-readable "
5253 "output.  For best results, the traced program should be compiled with "
5254 "debugging enabled, so that line-number information is recorded in the "
5255 "executable."
5256 msgstr ""
5257
5258 #. type: Plain text
5259 #: build/C/man3/mtrace.3:100
5260 msgid ""
5261 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
5262 "B<MALLOC_TRACE> points to a valid, writable pathname)."
5263 msgstr ""
5264
5265 #. type: Plain text
5266 #: build/C/man3/mtrace.3:106
5267 msgid ""
5268 "The line-number information produced by B<mtrace>(1)  is not always precise: "
5269 "the line number references may refer to the previous or following (non-"
5270 "blank)  line of the source code."
5271 msgstr ""
5272
5273 #. type: Plain text
5274 #: build/C/man3/mtrace.3:113
5275 msgid ""
5276 "The shell session below demonstrates the use of the B<mtrace>()  function "
5277 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
5278 "different locations.  The demonstration uses the following program:"
5279 msgstr ""
5280
5281 #. type: Plain text
5282 #: build/C/man3/mtrace.3:120
5283 #, no-wrap
5284 msgid ""
5285 "$ B<cat t_mtrace.c>\n"
5286 "#include E<lt>mcheck.hE<gt>\n"
5287 "#include E<lt>stdlib.hE<gt>\n"
5288 "#include E<lt>stdio.hE<gt>\n"
5289 msgstr ""
5290 "$ B<cat t_mtrace.c>\n"
5291 "#include E<lt>mcheck.hE<gt>\n"
5292 "#include E<lt>stdlib.hE<gt>\n"
5293 "#include E<lt>stdio.hE<gt>\n"
5294
5295 #. type: Plain text
5296 #: build/C/man3/mtrace.3:125
5297 #, no-wrap
5298 msgid ""
5299 "int\n"
5300 "main(int argc, char *argv[])\n"
5301 "{\n"
5302 "    int j;\n"
5303 msgstr ""
5304 "int\n"
5305 "main(int argc, char *argv[])\n"
5306 "{\n"
5307 "    int j;\n"
5308
5309 #. type: Plain text
5310 #: build/C/man3/mtrace.3:127
5311 #, no-wrap
5312 msgid "    mtrace();\n"
5313 msgstr "    mtrace();\n"
5314
5315 #. type: Plain text
5316 #: build/C/man3/mtrace.3:130
5317 #, no-wrap
5318 msgid ""
5319 "    for (j = 0; j E<lt> 2; j++)\n"
5320 "        malloc(100);            /* Never freed--a memory leak */\n"
5321 msgstr ""
5322 "    for (j = 0; j E<lt> 2; j++)\n"
5323 "        malloc(100);            /* Never freed--a memory leak */\n"
5324
5325 #. type: Plain text
5326 #: build/C/man3/mtrace.3:134
5327 #, no-wrap
5328 msgid ""
5329 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
5330 "    exit(EXIT_SUCCESS);\n"
5331 "}\n"
5332 msgstr ""
5333 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
5334 "    exit(EXIT_SUCCESS);\n"
5335 "}\n"
5336
5337 #. type: Plain text
5338 #: build/C/man3/mtrace.3:140
5339 msgid ""
5340 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
5341 "memory leaks at two different locations in the program:"
5342 msgstr ""
5343
5344 #. type: Plain text
5345 #: build/C/man3/mtrace.3:153
5346 #, no-wrap
5347 msgid ""
5348 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5349 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5350 "$ B<./t_mtrace>\n"
5351 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5352 "Memory not freed:\n"
5353 "-----------------\n"
5354 "   Address     Size     Caller\n"
5355 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
5356 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
5357 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
5358 msgstr ""
5359 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5360 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5361 "$ B<./t_mtrace>\n"
5362 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5363 "Memory not freed:\n"
5364 "-----------------\n"
5365 "   Address     Size     Caller\n"
5366 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
5367 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
5368 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
5369
5370 #. type: Plain text
5371 #: build/C/man3/mtrace.3:165
5372 msgid ""
5373 "The first two messages about unfreed memory correspond to the two B<malloc>"
5374 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
5375 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
5376 msgstr ""
5377
5378 #. type: Plain text
5379 #: build/C/man3/mtrace.3:170
5380 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5381 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5382
5383 #. type: TH
5384 #: build/C/man2/posix_fadvise.2:27
5385 #, no-wrap
5386 msgid "POSIX_FADVISE"
5387 msgstr "POSIX_FADVISE"
5388
5389 #. type: TH
5390 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
5391 #, no-wrap
5392 msgid "2010-10-09"
5393 msgstr "2010-10-09"
5394
5395 #. type: Plain text
5396 #: build/C/man2/posix_fadvise.2:30
5397 msgid "posix_fadvise - predeclare an access pattern for file data"
5398 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
5399
5400 #. type: Plain text
5401 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
5402 #, no-wrap
5403 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
5404 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
5405
5406 #. type: Plain text
5407 #: build/C/man2/posix_fadvise.2:36
5408 #, no-wrap
5409 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5410 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5411
5412 #. type: Plain text
5413 #: build/C/man2/posix_fadvise.2:45
5414 msgid "B<posix_fadvise>():"
5415 msgstr "B<posix_fadvise>():"
5416
5417 #. type: Plain text
5418 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
5419 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5420 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5421
5422 #. type: Plain text
5423 #: build/C/man2/posix_fadvise.2:55
5424 msgid ""
5425 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
5426 "data in a specific pattern in the future, thus allowing the kernel to "
5427 "perform appropriate optimizations."
5428 msgstr ""
5429 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
5430 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
5431 "適化を実行することが可能になる。"
5432
5433 #. type: Plain text
5434 #: build/C/man2/posix_fadvise.2:62
5435 msgid ""
5436 "The I<advice> applies to a (not necessarily existent) region starting at "
5437 "I<offset> and extending for I<len> bytes (or until the end of the file if "
5438 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
5439 "binding; it merely constitutes an expectation on behalf of the application."
5440 msgstr ""
5441 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
5442 "イ\n"
5443 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
5444 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
5445 "ケー\n"
5446 "ションのために可能性を構成するだけである。"
5447
5448 #. type: Plain text
5449 #: build/C/man2/posix_fadvise.2:64
5450 msgid "Permissible values for I<advice> include:"
5451 msgstr "I<advice> に許される値には、以下のものが含まれる:"
5452
5453 #. type: TP
5454 #: build/C/man2/posix_fadvise.2:64
5455 #, no-wrap
5456 msgid "B<POSIX_FADV_NORMAL>"
5457 msgstr "B<POSIX_FADV_NORMAL>"
5458
5459 #. type: Plain text
5460 #: build/C/man2/posix_fadvise.2:70
5461 msgid ""
5462 "Indicates that the application has no advice to give about its access "
5463 "pattern for the specified data.  If no advice is given for an open file, "
5464 "this is the default assumption."
5465 msgstr ""
5466 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
5467 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
5468 "合、 これがデフォルトで仮定される。"
5469
5470 #. type: TP
5471 #: build/C/man2/posix_fadvise.2:70
5472 #, no-wrap
5473 msgid "B<POSIX_FADV_SEQUENTIAL>"
5474 msgstr "B<POSIX_FADV_SEQUENTIAL>"
5475
5476 #. type: Plain text
5477 #: build/C/man2/posix_fadvise.2:74
5478 msgid ""
5479 "The application expects to access the specified data sequentially (with "
5480 "lower offsets read before higher ones)."
5481 msgstr ""
5482 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
5483 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
5484
5485 #. type: TP
5486 #: build/C/man2/posix_fadvise.2:74
5487 #, no-wrap
5488 msgid "B<POSIX_FADV_RANDOM>"
5489 msgstr "B<POSIX_FADV_RANDOM>"
5490
5491 #. type: Plain text
5492 #: build/C/man2/posix_fadvise.2:77
5493 msgid "The specified data will be accessed in random order."
5494 msgstr "指定されたデータがランダムな順番でアクセスされる。"
5495
5496 #. type: TP
5497 #: build/C/man2/posix_fadvise.2:77
5498 #, no-wrap
5499 msgid "B<POSIX_FADV_NOREUSE>"
5500 msgstr "B<POSIX_FADV_NOREUSE>"
5501
5502 #. type: Plain text
5503 #: build/C/man2/posix_fadvise.2:80
5504 msgid "The specified data will be accessed only once."
5505 msgstr "指定されたデータは 1 度しかアクセスされない。"
5506
5507 #. type: TP
5508 #: build/C/man2/posix_fadvise.2:80
5509 #, no-wrap
5510 msgid "B<POSIX_FADV_WILLNEED>"
5511 msgstr "B<POSIX_FADV_WILLNEED>"
5512
5513 #. type: Plain text
5514 #: build/C/man2/posix_fadvise.2:83
5515 msgid "The specified data will be accessed in the near future."
5516 msgstr "指定されたデータは近い将来アクセスされる。"
5517
5518 #. type: TP
5519 #: build/C/man2/posix_fadvise.2:83
5520 #, no-wrap
5521 msgid "B<POSIX_FADV_DONTNEED>"
5522 msgstr "B<POSIX_FADV_DONTNEED>"
5523
5524 #. type: Plain text
5525 #: build/C/man2/posix_fadvise.2:86
5526 msgid "The specified data will not be accessed in the near future."
5527 msgstr "指定されたデータは近い将来アクセスされない。"
5528
5529 #. type: Plain text
5530 #: build/C/man2/posix_fadvise.2:89
5531 msgid "On success, zero is returned.  On error, an error number is returned."
5532 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
5533
5534 #. type: Plain text
5535 #: build/C/man2/posix_fadvise.2:93
5536 msgid "The I<fd> argument was not a valid file descriptor."
5537 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
5538
5539 #. type: Plain text
5540 #: build/C/man2/posix_fadvise.2:96
5541 msgid "An invalid value was specified for I<advice>."
5542 msgstr "無効な値が I<advice> に指定された。"
5543
5544 #. type: Plain text
5545 #: build/C/man2/posix_fadvise.2:103
5546 msgid ""
5547 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
5548 "returns B<EINVAL> in this case.)"
5549 msgstr ""
5550 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
5551 "合、Linux は実際には B<EINVAL> を返す)。"
5552
5553 #.  of fadvise64_64()
5554 #. type: Plain text
5555 #: build/C/man2/posix_fadvise.2:111
5556 msgid ""
5557 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
5558 "called B<fadvise64>().  Library support has been provided since glibc "
5559 "version 2.2, via the wrapper function B<posix_fadvise>()."
5560 msgstr ""
5561 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
5562 "対応するシステムコールは B<fadvise64>() という名前である。\n"
5563 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
5564 "ラッパー関数は B<posix_fadvise>() という名前である。"
5565
5566 #. type: Plain text
5567 #: build/C/man2/posix_fadvise.2:120
5568 msgid ""
5569 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
5570 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
5571 msgstr ""
5572 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
5573 "I<off_t> に変更された点に注意すること。"
5574
5575 #. type: Plain text
5576 #: build/C/man2/posix_fadvise.2:126
5577 msgid ""
5578 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
5579 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
5580 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
5581 "the entire file, not just the specified region (but other open file handles "
5582 "to the same file are unaffected)."
5583 msgstr ""
5584 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
5585 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
5586 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
5587 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
5588 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
5589
5590 #. type: Plain text
5591 #: build/C/man2/posix_fadvise.2:133
5592 msgid ""
5593 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
5594 "into the page cache.  The amount of data read may be decreased by the kernel "
5595 "depending on virtual memory load.  (A few megabytes will usually be fully "
5596 "satisfied, and more is rarely useful.)"
5597 msgstr ""
5598 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
5599 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
5600 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
5601 "くてもめったに役に立たない)。"
5602
5603 #. type: Plain text
5604 #: build/C/man2/posix_fadvise.2:137
5605 msgid ""
5606 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
5607 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
5608 "flag is a no-op."
5609 msgstr ""
5610 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
5611 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
5612 "フラグは何も行わない。"
5613
5614 #. type: Plain text
5615 #: build/C/man2/posix_fadvise.2:145
5616 msgid ""
5617 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
5618 "specified region.  This is useful, for example, while streaming large "
5619 "files.  A program may periodically request the kernel to free cached data "
5620 "that has already been used, so that more useful cached pages are not "
5621 "discarded instead."
5622 msgstr ""
5623 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
5624 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
5625 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
5626 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
5627 "されたページが、 代わりに破棄されることはない。"
5628
5629 #. type: Plain text
5630 #: build/C/man2/posix_fadvise.2:153
5631 msgid ""
5632 "Pages that have not yet been written out will be unaffected, so if the "
5633 "application wishes to guarantee that pages will be released, it should call "
5634 "B<fsync>(2)  or B<fdatasync>(2)  first."
5635 msgstr ""
5636 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
5637 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
5638 "B<fdatasync>(2)  を呼ぶべきである。"
5639
5640 #. type: SS
5641 #: build/C/man2/posix_fadvise.2:153
5642 #, no-wrap
5643 msgid "arm_fadvise()"
5644 msgstr "arm_fadvise()"
5645
5646 #. type: Plain text
5647 #: build/C/man2/posix_fadvise.2:165
5648 msgid ""
5649 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
5650 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
5651 "()  is flawed, since it forces a register to be wasted as padding between "
5652 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
5653 "a different system call that orders the arguments suitably:"
5654 msgstr ""
5655
5656 #. type: Plain text
5657 #: build/C/man2/posix_fadvise.2:170
5658 #, no-wrap
5659 msgid ""
5660 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5661 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5662 msgstr ""
5663 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
5664 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
5665
5666 #.  No ARM support in glibc.
5667 #. type: Plain text
5668 #: build/C/man2/posix_fadvise.2:177
5669 msgid ""
5670 "The behavior of this system call is otherwise exactly the same as "
5671 "B<posix_fadvise>().  No library support is provided for this system call in "
5672 "glibc."
5673 msgstr ""
5674
5675 #. type: Plain text
5676 #: build/C/man2/posix_fadvise.2:182
5677 msgid ""
5678 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
5679 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
5680 "through to the end of the file\"."
5681 msgstr ""
5682 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
5683 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
5684 "いた。"
5685
5686 #.  FIXME . Write a posix_fadvise(3) page.
5687 #. type: Plain text
5688 #: build/C/man2/posix_fadvise.2:188
5689 msgid ""
5690 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
5691 "B<posix_madvise>(3)"
5692 msgstr ""
5693 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
5694 "B<posix_madvise>(3)"
5695
5696 #. type: TH
5697 #: build/C/man3/posix_fallocate.3:23
5698 #, no-wrap
5699 msgid "POSIX_FALLOCATE"
5700 msgstr "POSIX_FALLOCATE"
5701
5702 #. type: TH
5703 #: build/C/man3/posix_fallocate.3:23
5704 #, no-wrap
5705 msgid "2010-09-20"
5706 msgstr "2010-09-20"
5707
5708 #. type: Plain text
5709 #: build/C/man3/posix_fallocate.3:26
5710 msgid "posix_fallocate - allocate file space"
5711 msgstr "posix_fallocate - ファイルのスペースを確保する"
5712
5713 #. type: Plain text
5714 #: build/C/man3/posix_fallocate.3:31
5715 #, no-wrap
5716 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5717 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
5718
5719 #. type: Plain text
5720 #: build/C/man3/posix_fallocate.3:40
5721 msgid "B<posix_fallocate>():"
5722 msgstr "B<posix_fallocate>():"
5723
5724 #. type: Plain text
5725 #: build/C/man3/posix_fallocate.3:59
5726 msgid ""
5727 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
5728 "the file referred to by the descriptor I<fd> for the bytes in the range "
5729 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
5730 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
5731 "range are guaranteed not to fail because of lack of disk space."
5732 msgstr ""
5733 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
5734 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
5735 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
5736 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
5737 "失敗しないことが保証される。"
5738
5739 #. type: Plain text
5740 #: build/C/man3/posix_fallocate.3:64
5741 msgid ""
5742 "If the size of the file is less than I<offset>+I<len>, then the file is "
5743 "increased to this size; otherwise the file size is left unchanged."
5744 msgstr ""
5745 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
5746 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
5747
5748 #. type: Plain text
5749 #: build/C/man3/posix_fallocate.3:70
5750 msgid ""
5751 "B<posix_fallocate>()  returns zero on success, or an error number on "
5752 "failure.  Note that I<errno> is not set."
5753 msgstr ""
5754 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
5755 "す。 I<errno> が設定されない点に注意すること。"
5756
5757 #. type: Plain text
5758 #: build/C/man3/posix_fallocate.3:79
5759 msgid "I<offset+len> exceeds the maximum file size."
5760 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
5761
5762 #. type: Plain text
5763 #: build/C/man3/posix_fallocate.3:89
5764 msgid "I<fd> does not refer to a regular file."
5765 msgstr "I<fd> が通常のファイルとして参照されていない。"
5766
5767 #. type: Plain text
5768 #: build/C/man3/posix_fallocate.3:98
5769 msgid "I<fd> refers to a pipe."
5770 msgstr "I<fd> がパイプを参照している。"
5771
5772 #. type: Plain text
5773 #: build/C/man3/posix_fallocate.3:101
5774 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
5775 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
5776
5777 #. type: Plain text
5778 #: build/C/man3/posix_fallocate.3:126
5779 msgid ""
5780 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
5781 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
5782 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
5783 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
5784 "zero."
5785 msgstr ""
5786 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
5787 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
5788 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
5789 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
5790 "る。"
5791
5792 #. type: Plain text
5793 #: build/C/man3/posix_fallocate.3:130
5794 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5795 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
5796
5797 #. type: TH
5798 #: build/C/man3/posix_memalign.3:28
5799 #, no-wrap
5800 msgid "POSIX_MEMALIGN"
5801 msgstr "POSIX_MEMALIGN"
5802
5803 #. type: TH
5804 #: build/C/man3/posix_memalign.3:28
5805 #, no-wrap
5806 msgid "2012-03-23"
5807 msgstr "2012-03-23"
5808
5809 #. type: Plain text
5810 #: build/C/man3/posix_memalign.3:31
5811 msgid ""
5812 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
5813 "memory"
5814 msgstr ""
5815 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
5816 "されたメモリの割り当てを行う"
5817
5818 #. type: Plain text
5819 #: build/C/man3/posix_memalign.3:34 build/C/man3/malloc_get_state.3:29
5820 #, no-wrap
5821 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
5822 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
5823
5824 #. type: Plain text
5825 #: build/C/man3/posix_memalign.3:38
5826 #, no-wrap
5827 msgid ""
5828 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5829 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5830 "B<void *valloc(size_t >I<size>B<);>\n"
5831 msgstr ""
5832 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5833 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5834 "B<void *valloc(size_t >I<size>B<);>\n"
5835
5836 #. type: Plain text
5837 #: build/C/man3/posix_memalign.3:43
5838 #, no-wrap
5839 msgid ""
5840 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5841 "B<void *pvalloc(size_t >I<size>B<);>\n"
5842 msgstr ""
5843 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
5844 "B<void *pvalloc(size_t >I<size>B<);>\n"
5845
5846 #. type: Plain text
5847 #: build/C/man3/posix_memalign.3:53
5848 msgid ""
5849 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5850 "E<gt>=\\ 600"
5851 msgstr ""
5852 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
5853 "E<gt>=\\ 600"
5854
5855 #. type: Plain text
5856 #: build/C/man3/posix_memalign.3:56
5857 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
5858 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
5859
5860 #. type: Plain text
5861 #: build/C/man3/posix_memalign.3:58
5862 msgid "B<valloc>():"
5863 msgstr "B<valloc>():"
5864
5865 #. type: TP
5866 #: build/C/man3/posix_memalign.3:61
5867 #, no-wrap
5868 msgid "Since glibc 2.12:"
5869 msgstr "glibc 2.12 以降:"
5870
5871 #. type: Plain text
5872 #: build/C/man3/posix_memalign.3:68
5873 #, no-wrap
5874 msgid ""
5875 "_BSD_SOURCE ||\n"
5876 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5877 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5878 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5879 msgstr ""
5880 "_BSD_SOURCE ||\n"
5881 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
5882 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
5883 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
5884
5885 #. type: TP
5886 #: build/C/man3/posix_memalign.3:70
5887 #, no-wrap
5888 msgid "Before glibc 2.12:"
5889 msgstr "glibc 2.12 より前:"
5890
5891 #. type: Plain text
5892 #: build/C/man3/posix_memalign.3:74
5893 msgid ""
5894 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5895 "_XOPEN_SOURCE_EXTENDED"
5896 msgstr ""
5897 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
5898 "_XOPEN_SOURCE_EXTENDED"
5899
5900 #. type: Plain text
5901 #: build/C/man3/posix_memalign.3:81
5902 msgid ""
5903 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
5904 "declaration of B<valloc>(); no feature test macros are required.)"
5905 msgstr ""
5906 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
5907 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
5908
5909 #.  glibc does this:
5910 #. type: Plain text
5911 #: build/C/man3/posix_memalign.3:102
5912 msgid ""
5913 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
5914 "address of the allocated memory in I<*memptr>.  The address of the allocated "
5915 "memory will be a multiple of I<alignment>, which must be a power of two and "
5916 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
5917 "returns either NULL, or a unique pointer value that can later be "
5918 "successfully passed to B<free>(3)."
5919 msgstr ""
5920 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
5921 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
5922 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
5923 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
5924 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
5925 "で B<free>(3)  に問題なく渡すことができる。"
5926
5927 #.  The behavior of memalign() for size==0 is as for posix_memalign()
5928 #.  but no standards govern this.
5929 #. type: Plain text
5930 #: build/C/man3/posix_memalign.3:113
5931 msgid ""
5932 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
5933 "pointer to the allocated memory.  The memory address will be a multiple of "
5934 "I<alignment>, which must be a power of two."
5935 msgstr ""
5936 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
5937 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
5938 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
5939
5940 #. type: Plain text
5941 #: build/C/man3/posix_memalign.3:122
5942 msgid ""
5943 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
5944 "the added restriction that I<size> should be a multiple of I<alignment>."
5945 msgstr ""
5946 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
5947 "I<alignment>\n"
5948 "の倍数でなければならないという追加の制限がある点が異なる。"
5949
5950 #. type: Plain text
5951 #: build/C/man3/posix_memalign.3:132
5952 msgid ""
5953 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
5954 "pointer to the allocated memory.  The memory address will be a multiple of "
5955 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
5956 msgstr ""
5957 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
5958 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
5959 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
5960 "る。"
5961
5962 #. type: Plain text
5963 #: build/C/man3/posix_memalign.3:139
5964 msgid ""
5965 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
5966 "the size of the allocation up to the next multiple of the system page size."
5967 msgstr ""
5968 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
5969 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
5970
5971 #. type: Plain text
5972 #: build/C/man3/posix_memalign.3:141
5973 msgid "For all of these functions, the memory is not zeroed."
5974 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
5975
5976 #. type: Plain text
5977 #: build/C/man3/posix_memalign.3:148
5978 msgid ""
5979 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
5980 "pointer to the allocated memory, or NULL if the request fails."
5981 msgstr ""
5982 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
5983 "た\n"
5984 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
5985
5986 #. type: Plain text
5987 #: build/C/man3/posix_memalign.3:155
5988 msgid ""
5989 "B<posix_memalign>()  returns zero on success, or one of the error values "
5990 "listed in the next section on failure.  Note that I<errno> is not set."
5991 msgstr ""
5992 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
5993 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
5994 "ること。"
5995
5996 #. type: Plain text
5997 #: build/C/man3/posix_memalign.3:162
5998 msgid ""
5999 "The I<alignment> argument was not a power of two, or was not a multiple of "
6000 "I<sizeof(void *)>."
6001 msgstr ""
6002 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
6003 "かった。"
6004
6005 #. type: Plain text
6006 #: build/C/man3/posix_memalign.3:165
6007 msgid "There was insufficient memory to fulfill the allocation request."
6008 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
6009
6010 #. type: Plain text
6011 #: build/C/man3/posix_memalign.3:172
6012 msgid ""
6013 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
6014 "available in all Linux libc libraries."
6015 msgstr ""
6016 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
6017 "すべての Linux libc ライブラリで使用可能である。"
6018
6019 #. type: Plain text
6020 #: build/C/man3/posix_memalign.3:176
6021 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
6022 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
6023
6024 #. type: Plain text
6025 #: build/C/man3/posix_memalign.3:180
6026 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
6027 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
6028
6029 #. type: Plain text
6030 #: build/C/man3/posix_memalign.3:187
6031 msgid ""
6032 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
6033 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
6034 "POSIX.1-2001."
6035 msgstr ""
6036 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
6037 "り、\n"
6038 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
6039
6040 #. type: Plain text
6041 #: build/C/man3/posix_memalign.3:191
6042 msgid "The function B<pvalloc>()  is a GNU extension."
6043 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
6044
6045 #. type: Plain text
6046 #: build/C/man3/posix_memalign.3:195
6047 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
6048 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
6049
6050 #. type: Plain text
6051 #: build/C/man3/posix_memalign.3:199
6052 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
6053 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
6054
6055 #. type: Plain text
6056 #: build/C/man3/posix_memalign.3:204
6057 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
6058 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
6059
6060 #. type: SS
6061 #: build/C/man3/posix_memalign.3:204
6062 #, no-wrap
6063 msgid "Headers"
6064 msgstr "ヘッダ"
6065
6066 #. type: Plain text
6067 #: build/C/man3/posix_memalign.3:208
6068 msgid ""
6069 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
6070 "hE<gt>>."
6071 msgstr ""
6072 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
6073 "の意見が一致している。"
6074
6075 #. type: Plain text
6076 #: build/C/man3/posix_memalign.3:212
6077 msgid ""
6078 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
6079 "of I<E<lt>malloc.hE<gt>>."
6080 msgstr ""
6081 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
6082 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
6083
6084 #. type: Plain text
6085 #: build/C/man3/posix_memalign.3:219
6086 msgid ""
6087 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
6088 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
6089 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
6090 "above)."
6091 msgstr ""
6092 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
6093 "libc4,5\n"
6094 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
6095 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
6096
6097 #. type: Plain text
6098 #: build/C/man3/posix_memalign.3:228
6099 msgid ""
6100 "On many systems there are alignment restrictions, for example, on buffers "
6101 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
6102 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
6103 "use B<posix_memalign>()  to satisfy this requirement."
6104 msgstr ""
6105 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
6106 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
6107 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
6108 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
6109 "と、この必要条件を満たすことができる。"
6110
6111 #. type: Plain text
6112 #: build/C/man3/posix_memalign.3:237
6113 msgid ""
6114 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
6115 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
6116 "is correct."
6117 msgstr ""
6118 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
6119 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
6120 "確認を行わないかもしれない。"
6121
6122 #.  Other systems allow passing the result of
6123 #.  .IR valloc ()
6124 #.  to
6125 #.  .IR free (3),
6126 #.  but not to
6127 #.  .IR realloc (3).
6128 #. type: Plain text
6129 #: build/C/man3/posix_memalign.3:265
6130 msgid ""
6131 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
6132 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
6133 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
6134 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
6135 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
6136 "implementation allows memory obtained from any of these these functions to "
6137 "be reclaimed with B<free>(3)."
6138 msgstr ""
6139 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を使って\n"
6140 "解放することができる必要がある。 いくつかのシステムでは B<memalign>() や\n"
6141 "B<valloc>() で割り当てられたメモリを再利用する手段が提供されていない。\n"
6142 "(なぜなら B<free>(3) に渡すことができるのは B<malloc>(3) から受け取った\n"
6143 "ポインタだけだが、 例えば B<memalign>() は B<malloc>(3) を呼び出し、\n"
6144 "得た値をアラインメントしてしまうからである) glibc の実装では、 ここに述べた\n"
6145 "関数のいずれで獲得したメモリも B<free>(3) で再利用することができる。"
6146
6147 #. type: Plain text
6148 #: build/C/man3/posix_memalign.3:270
6149 msgid ""
6150 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
6151 "these functions are only needed if you require larger alignment values."
6152 msgstr ""
6153 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
6154 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
6155 "ト\n"
6156 "が必要な場合だけである。"
6157
6158 #. type: Plain text
6159 #: build/C/man3/posix_memalign.3:275
6160 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6161 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6162
6163 #. type: TH
6164 #: build/C/man2/readahead.2:28
6165 #, no-wrap
6166 msgid "READAHEAD"
6167 msgstr "READAHEAD"
6168
6169 #. type: TH
6170 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
6171 #, no-wrap
6172 msgid "2010-09-10"
6173 msgstr "2010-09-10"
6174
6175 #. type: Plain text
6176 #: build/C/man2/readahead.2:31
6177 msgid "readahead - perform file readahead into page cache"
6178 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
6179
6180 #. type: Plain text
6181 #: build/C/man2/readahead.2:37
6182 #, no-wrap
6183 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6184 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6185
6186 #. type: Plain text
6187 #: build/C/man2/readahead.2:65
6188 msgid ""
6189 "B<readahead>()  populates the page cache with data from a file so that "
6190 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
6191 "argument is a file descriptor identifying the file which is to be read.  The "
6192 "I<offset> argument specifies the starting point from which data is to be "
6193 "read and I<count> specifies the number of bytes to be read.  I/O is "
6194 "performed in whole pages, so that I<offset> is effectively rounded down to a "
6195 "page boundary and bytes are read up to the next page boundary greater than "
6196 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
6197 "of the file.  B<readahead>()  blocks until the specified data has been "
6198 "read.  The current file offset of the open file referred to by I<fd> is left "
6199 "unchanged."
6200 msgstr ""
6201 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
6202 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
6203 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
6204 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
6205 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
6206 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
6207 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
6208 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
6209 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
6210 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
6211 "更されない。"
6212
6213 #. type: Plain text
6214 #: build/C/man2/readahead.2:71
6215 msgid ""
6216 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
6217 "I<errno> set to indicate the cause of the error."
6218 msgstr ""
6219 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
6220 "ラーの原因を示す値を設定する。"
6221
6222 #. type: Plain text
6223 #: build/C/man2/readahead.2:76
6224 msgid "I<fd> is not a valid file descriptor or is not open for reading."
6225 msgstr ""
6226 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
6227 "ていない。"
6228
6229 #. type: Plain text
6230 #: build/C/man2/readahead.2:82
6231 msgid ""
6232 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
6233 msgstr ""
6234 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
6235 "ファイルであった。"
6236
6237 #. type: Plain text
6238 #: build/C/man2/readahead.2:87
6239 msgid ""
6240 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
6241 "been provided since version 2.3."
6242 msgstr ""
6243 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
6244 "は glibc バージョン 2.3 以降で行われている。"
6245
6246 #. type: Plain text
6247 #: build/C/man2/readahead.2:92
6248 msgid ""
6249 "The B<readahead>()  system call is Linux-specific, and its use should be "
6250 "avoided in portable applications."
6251 msgstr ""
6252 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
6253 "は 使用を避けるべきである。"
6254
6255 #. type: Plain text
6256 #: build/C/man2/readahead.2:98
6257 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6258 msgstr ""
6259 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6260
6261 #. type: TH
6262 #: build/C/man2/remap_file_pages.2:26
6263 #, no-wrap
6264 msgid "REMAP_FILE_PAGES"
6265 msgstr "REMAP_FILE_PAGES"
6266
6267 #. type: Plain text
6268 #: build/C/man2/remap_file_pages.2:29
6269 msgid "remap_file_pages - create a nonlinear file mapping"
6270 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
6271
6272 #. type: Plain text
6273 #: build/C/man2/remap_file_pages.2:33
6274 #, no-wrap
6275 msgid ""
6276 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6277 "B<#include E<lt>sys/mman.hE<gt>>\n"
6278 msgstr ""
6279 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6280 "B<#include E<lt>sys/mman.hE<gt>>\n"
6281
6282 #. type: Plain text
6283 #: build/C/man2/remap_file_pages.2:36
6284 #, no-wrap
6285 msgid ""
6286 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6287 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6288 msgstr ""
6289 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6290 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6291
6292 #. type: Plain text
6293 #: build/C/man2/remap_file_pages.2:49
6294 msgid ""
6295 "The B<remap_file_pages>()  system call is used to create a nonlinear "
6296 "mapping, that is, a mapping in which the pages of the file are mapped into a "
6297 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
6298 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
6299 "does not require the kernel to create additional VMA (Virtual Memory Area) "
6300 "data structures."
6301 msgstr ""
6302 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
6303 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
6304 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
6305 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
6306 "域)  データ構造体を追加で作成する必要がないことである。"
6307
6308 #. type: Plain text
6309 #: build/C/man2/remap_file_pages.2:51
6310 msgid "To create a nonlinear mapping we perform the following steps:"
6311 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
6312
6313 #. type: TP
6314 #: build/C/man2/remap_file_pages.2:51
6315 #, no-wrap
6316 msgid "1."
6317 msgstr "1."
6318
6319 #. type: Plain text
6320 #: build/C/man2/remap_file_pages.2:59
6321 msgid ""
6322 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
6323 "mapping must be created with the B<MAP_SHARED> flag."
6324 msgstr ""
6325 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
6326 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
6327 "い。"
6328
6329 #. type: TP
6330 #: build/C/man2/remap_file_pages.2:59
6331 #, no-wrap
6332 msgid "2."
6333 msgstr "2."
6334
6335 #. type: Plain text
6336 #: build/C/man2/remap_file_pages.2:67
6337 msgid ""
6338 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
6339 "correspondence between the pages of the mapping and the pages of the file.  "
6340 "It is possible to map the same page of a file into multiple locations within "
6341 "the mapped region."
6342 msgstr ""
6343 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
6344 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
6345 "所に マップすることが可能である。"
6346
6347 #. type: Plain text
6348 #: build/C/man2/remap_file_pages.2:78
6349 msgid ""
6350 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
6351 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
6352 "system page size; I<size> is the length of the region in bytes."
6353 msgstr ""
6354 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
6355 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
6356 "る。 I<size> は領域の長さであり、単位はバイトである。"
6357
6358 #. type: Plain text
6359 #: build/C/man2/remap_file_pages.2:96
6360 msgid ""
6361 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
6362 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
6363 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
6364 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
6365 "and I<size> will be placed."
6366 msgstr ""
6367 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
6368 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
6369 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
6370 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
6371 "レスを、 I<addr> によって指定することである。"
6372
6373 #.  This rounding is weird, and not consistent with the treatment of
6374 #.  the analogous arguments for munmap()/mprotect() and for mlock().
6375 #.  MTK, 14 Sep 2005
6376 #. type: Plain text
6377 #: build/C/man2/remap_file_pages.2:110
6378 msgid ""
6379 "The values specified in I<addr> and I<size> should be multiples of the "
6380 "system page size.  If they are not, then the kernel rounds I<both> values "
6381 "I<down> to the nearest multiple of the page size."
6382 msgstr ""
6383 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
6384 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
6385 "「切り下げる」。"
6386
6387 #. type: Plain text
6388 #: build/C/man2/remap_file_pages.2:114
6389 msgid "The I<prot> argument must be specified as 0."
6390 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
6391
6392 #. type: Plain text
6393 #: build/C/man2/remap_file_pages.2:122
6394 msgid ""
6395 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
6396 "other than B<MAP_NONBLOCK> are ignored."
6397 msgstr ""
6398 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
6399 "の全てのフラグは無視される。"
6400
6401 #. type: Plain text
6402 #: build/C/man2/remap_file_pages.2:129
6403 msgid ""
6404 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
6405 "I<errno> is set appropriately."
6406 msgstr ""
6407 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
6408 "れ、 I<errno> が適切に設定される。"
6409
6410 #. type: Plain text
6411 #: build/C/man2/remap_file_pages.2:137
6412 msgid ""
6413 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
6414 "flag."
6415 msgstr ""
6416 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
6417 "いない。"
6418
6419 #.  And possibly others from vma->vm_ops->populate()
6420 #. type: Plain text
6421 #: build/C/man2/remap_file_pages.2:146
6422 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
6423 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
6424
6425 #. type: Plain text
6426 #: build/C/man2/remap_file_pages.2:151
6427 msgid ""
6428 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
6429 "support was added in version 2.3.3."
6430 msgstr ""
6431 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
6432 "サポートは glibc バージョン 2.3.3 で追加された。"
6433
6434 #. type: Plain text
6435 #: build/C/man2/remap_file_pages.2:155
6436 msgid "The B<remap_file_pages>()  system call is Linux-specific."
6437 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
6438
6439 #. type: Plain text
6440 #: build/C/man2/remap_file_pages.2:162
6441 msgid ""
6442 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6443 "B<msync>(2)"
6444 msgstr ""
6445 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6446 "B<msync>(2)"
6447
6448 #. type: TH
6449 #: build/C/man3/shm_open.3:26
6450 #, no-wrap
6451 msgid "SHM_OPEN"
6452 msgstr "SHM_OPEN"
6453
6454 #. type: TH
6455 #: build/C/man3/shm_open.3:26
6456 #, no-wrap
6457 msgid "2009-02-25"
6458 msgstr "2009-02-25"
6459
6460 #. type: Plain text
6461 #: build/C/man3/shm_open.3:29
6462 msgid ""
6463 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
6464 msgstr ""
6465 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
6466 "行う"
6467
6468 #. type: Plain text
6469 #: build/C/man3/shm_open.3:33
6470 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
6471 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
6472
6473 #. type: Plain text
6474 #: build/C/man3/shm_open.3:35
6475 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
6476 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
6477
6478 #. type: Plain text
6479 #: build/C/man3/shm_open.3:37
6480 msgid ""
6481 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6482 msgstr ""
6483 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
6484 ">I<mode>B<);>"
6485
6486 #. type: Plain text
6487 #: build/C/man3/shm_open.3:39
6488 msgid "B<int shm_unlink(const char *>I<name>B<);>"
6489 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
6490
6491 #. type: Plain text
6492 #: build/C/man3/shm_open.3:41
6493 msgid "Link with I<-lrt>."
6494 msgstr "I<-lrt> でリンクする。"
6495
6496 #. type: Plain text
6497 #: build/C/man3/shm_open.3:53
6498 msgid ""
6499 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
6500 "memory object.  A POSIX shared memory object is in effect a handle which can "
6501 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
6502 "memory.  The B<shm_unlink>()  function performs the converse operation, "
6503 "removing an object previously created by B<shm_open>()."
6504 msgstr ""
6505 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
6506 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
6507 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
6508 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
6509 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
6510
6511 #.  glibc allows the initial slash to be omitted, and makes
6512 #.  multiple initial slashes equivalent to a single slash.
6513 #.  This differs from the implementation of POSIX message queues.
6514 #.  glibc allows subdirectory components in the name, in which
6515 #.  case the subdirectory must exist under /dev/shm, and allow the
6516 #.  required permissions if a user wants to create a shared memory
6517 #.  object in that subdirectory.
6518 #. type: Plain text
6519 #: build/C/man3/shm_open.3:74
6520 msgid ""
6521 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
6522 "specifies the shared memory object to be created or opened.  For portable "
6523 "use, a shared memory object should be identified by a name of the form I</"
6524 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
6525 "255) characters consisting of an initial slash, followed by one or more "
6526 "characters, none of which are slashes."
6527 msgstr ""
6528 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
6529 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
6530 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
6531 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
6532 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
6533
6534 #. type: Plain text
6535 #: build/C/man3/shm_open.3:81
6536 msgid ""
6537 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
6538 "or B<O_RDWR> and any of the other flags listed here:"
6539 msgstr ""
6540 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
6541 "述べる他のフラグの論理和をとったもの を指定する。"
6542
6543 #. type: TP
6544 #: build/C/man3/shm_open.3:81
6545 #, no-wrap
6546 msgid "B<O_RDONLY>"
6547 msgstr "B<O_RDONLY>"
6548
6549 #. type: Plain text
6550 #: build/C/man3/shm_open.3:87
6551 msgid ""
6552 "Open the object for read access.  A shared memory object opened in this way "
6553 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
6554 msgstr ""
6555 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
6556 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
6557 "B<mmap>(2)  することができる。"
6558
6559 #. type: TP
6560 #: build/C/man3/shm_open.3:87
6561 #, no-wrap
6562 msgid "B<O_RDWR>"
6563 msgstr "B<O_RDWR>"
6564
6565 #. type: Plain text
6566 #: build/C/man3/shm_open.3:90
6567 msgid "Open the object for read-write access."
6568 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
6569
6570 #. type: TP
6571 #: build/C/man3/shm_open.3:90
6572 #, no-wrap
6573 msgid "B<O_CREAT>"
6574 msgstr "B<O_CREAT>"
6575
6576 #.  In truth it is actually the file system IDs on Linux, but these
6577 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
6578 #. type: Plain text
6579 #: build/C/man3/shm_open.3:110
6580 msgid ""
6581 "Create the shared memory object if it does not exist.  The user and group "
6582 "ownership of the object are taken from the corresponding effective IDs of "
6583 "the calling process, and the object's permission bits are set according to "
6584 "the low-order 9 bits of I<mode>, except that those bits set in the process "
6585 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
6586 "A set of macro constants which can be used to define I<mode> is listed in "
6587 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
6588 "including I<E<lt>sys/stat.hE<gt>>.)"
6589 msgstr ""
6590 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
6591 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
6592 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
6593 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
6594 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
6595 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
6596 "hE<gt>> のインクルードにより得られる)。"
6597
6598 #. type: Plain text
6599 #: build/C/man3/shm_open.3:116
6600 msgid ""
6601 "A new shared memory object initially has zero length\\(emthe size of the "
6602 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
6603 "shared memory object are automatically initialized to 0."
6604 msgstr ""
6605 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
6606 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
6607 "して新規に確保されたバイトは自動的に 0 に初期化される。"
6608
6609 #. type: TP
6610 #: build/C/man3/shm_open.3:116
6611 #, no-wrap
6612 msgid "B<O_EXCL>"
6613 msgstr "B<O_EXCL>"
6614
6615 #. type: Plain text
6616 #: build/C/man3/shm_open.3:125
6617 msgid ""
6618 "If B<O_CREAT> was also specified, and a shared memory object with the given "
6619 "I<name> already exists, return an error.  The check for the existence of the "
6620 "object, and its creation if it does not exist, are performed atomically."
6621 msgstr ""
6622 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
6623 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
6624 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
6625 "atomically)。"
6626
6627 #. type: TP
6628 #: build/C/man3/shm_open.3:125
6629 #, no-wrap
6630 msgid "B<O_TRUNC>"
6631 msgstr "B<O_TRUNC>"
6632
6633 #. type: Plain text
6634 #: build/C/man3/shm_open.3:128
6635 msgid "If the shared memory object already exists, truncate it to zero bytes."
6636 msgstr ""
6637 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
6638 "切り詰める。"
6639
6640 #. type: Plain text
6641 #: build/C/man3/shm_open.3:131
6642 msgid ""
6643 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
6644 "hE<gt>>."
6645 msgstr ""
6646 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
6647
6648 #. type: Plain text
6649 #: build/C/man3/shm_open.3:142
6650 msgid ""
6651 "On successful completion B<shm_open>()  returns a new file descriptor "
6652 "referring to the shared memory object.  This file descriptor is guaranteed "
6653 "to be the lowest-numbered file descriptor not previously opened within the "
6654 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
6655 "descriptor."
6656 msgstr ""
6657 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
6658 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
6659 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
6660 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
6661 "ファイル・ディスクリプタに設定される。"
6662
6663 #. type: Plain text
6664 #: build/C/man3/shm_open.3:151
6665 msgid ""
6666 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
6667 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
6668 "the file descriptor may be closed without affecting the memory mapping."
6669 msgstr ""
6670 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
6671 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
6672 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
6673 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
6674
6675 #. type: Plain text
6676 #: build/C/man3/shm_open.3:169
6677 msgid ""
6678 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
6679 "shared memory object name, and, once all processes have unmapped the object, "
6680 "de-allocates and destroys the contents of the associated memory region.  "
6681 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
6682 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
6683 "case a new, distinct object is created)."
6684 msgstr ""
6685 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
6686 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
6687 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
6688 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
6689 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
6690 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
6691
6692 #. type: Plain text
6693 #: build/C/man3/shm_open.3:178
6694 msgid ""
6695 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
6696 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
6697 "or -1 on error."
6698 msgstr ""
6699 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
6700 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
6701 "を、エラーが起こった場合 -1 を返す。"
6702
6703 #. type: Plain text
6704 #: build/C/man3/shm_open.3:185
6705 msgid ""
6706 "On failure, I<errno> is set to indicate the cause of the error.  Values "
6707 "which may appear in I<errno> include the following:"
6708 msgstr ""
6709 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
6710 "される値は以下の通りである:"
6711
6712 #. type: Plain text
6713 #: build/C/man3/shm_open.3:190
6714 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
6715 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
6716
6717 #. type: Plain text
6718 #: build/C/man3/shm_open.3:200
6719 msgid ""
6720 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
6721 "B<O_TRUNC> was specified and the caller does not have write permission on "
6722 "the object."
6723 msgstr ""
6724 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
6725 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
6726 "み権限が なかった。"
6727
6728 #. type: TP
6729 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
6730 #, no-wrap
6731 msgid "B<EEXIST>"
6732 msgstr "B<EEXIST>"
6733
6734 #. type: Plain text
6735 #: build/C/man3/shm_open.3:211
6736 msgid ""
6737 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
6738 "shared memory object specified by I<name> already exists."
6739 msgstr ""
6740 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
6741 "定された共有メモリ・オブジェクトが既に存在した。"
6742
6743 #. type: Plain text
6744 #: build/C/man3/shm_open.3:218
6745 msgid "The I<name> argument to B<shm_open>()  was invalid."
6746 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
6747
6748 #. type: TP
6749 #: build/C/man3/shm_open.3:218
6750 #, no-wrap
6751 msgid "B<EMFILE>"
6752 msgstr "B<EMFILE>"
6753
6754 #. type: Plain text
6755 #: build/C/man3/shm_open.3:221
6756 msgid "The process already has the maximum number of files open."
6757 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
6758
6759 #. type: TP
6760 #: build/C/man3/shm_open.3:221
6761 #, no-wrap
6762 msgid "B<ENAMETOOLONG>"
6763 msgstr "B<ENAMETOOLONG>"
6764
6765 #. type: Plain text
6766 #: build/C/man3/shm_open.3:227
6767 msgid "The length of I<name> exceeds B<PATH_MAX>."
6768 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
6769
6770 #. type: Plain text
6771 #: build/C/man3/shm_open.3:231
6772 msgid ""
6773 "The limit on the total number of files open on the system has been reached."
6774 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
6775
6776 #. type: TP
6777 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
6778 #: build/C/man2/shmget.2:206
6779 #, no-wrap
6780 msgid "B<ENOENT>"
6781 msgstr "B<ENOENT>"
6782
6783 #. type: Plain text
6784 #: build/C/man3/shm_open.3:240
6785 msgid ""
6786 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
6787 "B<O_CREAT> was not specified."
6788 msgstr ""
6789 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
6790 "B<O_CREAT> が指定されていなかった。"
6791
6792 #. type: Plain text
6793 #: build/C/man3/shm_open.3:247
6794 msgid ""
6795 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
6796 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
6797
6798 #. type: Plain text
6799 #: build/C/man3/shm_open.3:249
6800 msgid "These functions are provided in glibc 2.2 and later."
6801 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
6802
6803 #. type: Plain text
6804 #: build/C/man3/shm_open.3:255
6805 msgid ""
6806 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
6807 "object is set to either the calling process's effective group ID or \"a "
6808 "system default group ID\"."
6809 msgstr ""
6810 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
6811 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
6812 "ID」 のどちらかに設定される、と書かれている。"
6813
6814 #. type: Plain text
6815 #: build/C/man3/shm_open.3:264
6816 msgid ""
6817 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
6818 "unspecified.  On Linux, this will successfully truncate an existing shared "
6819 "memory object\\(emthis may not be so on other UNIX systems."
6820 msgstr ""
6821 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
6822 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
6823 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
6824
6825 #. type: Plain text
6826 #: build/C/man3/shm_open.3:269
6827 msgid ""
6828 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
6829 "dedicated file system, which is normally mounted under I</dev/shm>."
6830 msgstr ""
6831 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
6832 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
6833
6834 #. type: Plain text
6835 #: build/C/man3/shm_open.3:280
6836 msgid ""
6837 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6838 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6839 msgstr ""
6840 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
6841 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
6842
6843 #. type: TH
6844 #: build/C/man7/shm_overview.7:27
6845 #, no-wrap
6846 msgid "SHM_OVERVIEW"
6847 msgstr "SHM_OVERVIEW"
6848
6849 #. type: Plain text
6850 #: build/C/man7/shm_overview.7:30
6851 msgid "shm_overview - Overview of POSIX shared memory"
6852 msgstr "shm_overview - POSIX 共有メモリの概要"
6853
6854 #. type: Plain text
6855 #: build/C/man7/shm_overview.7:33
6856 msgid ""
6857 "The POSIX shared memory API allows processes to communicate information by "
6858 "sharing a region of memory."
6859 msgstr ""
6860 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
6861 "情報をやり取りすることができる。"
6862
6863 #. type: Plain text
6864 #: build/C/man7/shm_overview.7:35
6865 msgid "The interfaces employed in the API are:"
6866 msgstr "この API では以下のインターフェースが採用されている。"
6867
6868 #. type: TP
6869 #: build/C/man7/shm_overview.7:35
6870 #, no-wrap
6871 msgid "B<shm_open>(3)"
6872 msgstr "B<shm_open>(3)"
6873
6874 #. type: Plain text
6875 #: build/C/man7/shm_overview.7:42
6876 msgid ""
6877 "Create and open a new object, or open an existing object.  This is analogous "
6878 "to B<open>(2).  The call returns a file descriptor for use by the other "
6879 "interfaces listed below."
6880 msgstr ""
6881 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
6882 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
6883 "る ファイルディスクリプタを返す。"
6884
6885 #. type: TP
6886 #: build/C/man7/shm_overview.7:42
6887 #, no-wrap
6888 msgid "B<ftruncate>(2)"
6889 msgstr "B<ftruncate>(2)"
6890
6891 #. type: Plain text
6892 #: build/C/man7/shm_overview.7:46
6893 msgid ""
6894 "Set the size of the shared memory object.  (A newly created shared memory "
6895 "object has a length of zero.)"
6896 msgstr "共有メモリオブジェクトの大きさを設定する。"
6897
6898 #. type: Plain text
6899 #: build/C/man7/shm_overview.7:50
6900 msgid ""
6901 "Map the shared memory object into the virtual address space of the calling "
6902 "process."
6903 msgstr ""
6904 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
6905
6906 #. type: TP
6907 #: build/C/man7/shm_overview.7:50
6908 #, no-wrap
6909 msgid "B<munmap>(2)"
6910 msgstr "B<munmap>(2)"
6911
6912 #. type: Plain text
6913 #: build/C/man7/shm_overview.7:54
6914 msgid ""
6915 "Unmap the shared memory object from the virtual address space of the calling "
6916 "process."
6917 msgstr ""
6918 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
6919 "る。"
6920
6921 #. type: TP
6922 #: build/C/man7/shm_overview.7:54
6923 #, no-wrap
6924 msgid "B<shm_unlink>(3)"
6925 msgstr "B<shm_unlink>(3)"
6926
6927 #. type: Plain text
6928 #: build/C/man7/shm_overview.7:57
6929 msgid "Remove a shared memory object name."
6930 msgstr "共有メモリオブジェクト名を削除する。"
6931
6932 #. type: TP
6933 #: build/C/man7/shm_overview.7:57
6934 #, no-wrap
6935 msgid "B<close>(2)"
6936 msgstr "B<close>(2)"
6937
6938 #. type: Plain text
6939 #: build/C/man7/shm_overview.7:62
6940 msgid ""
6941 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
6942 "needed."
6943 msgstr ""
6944 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
6945 "のファイルディスクリプタをクローズする。"
6946
6947 #. type: TP
6948 #: build/C/man7/shm_overview.7:62
6949 #, no-wrap
6950 msgid "B<fstat>(2)"
6951 msgstr "B<fstat>(2)"
6952
6953 #. type: Plain text
6954 #: build/C/man7/shm_overview.7:76
6955 msgid ""
6956 "Obtain a I<stat> structure that describes the shared memory object.  Among "
6957 "the information returned by this call are the object's size (I<st_size>), "
6958 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
6959 msgstr ""
6960 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
6961 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
6962 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
6963
6964 #. type: TP
6965 #: build/C/man7/shm_overview.7:76
6966 #, no-wrap
6967 msgid "B<fchown>(2)"
6968 msgstr "B<fchown>(2)"
6969
6970 #. type: Plain text
6971 #: build/C/man7/shm_overview.7:79
6972 msgid "To change the ownership of a shared memory object."
6973 msgstr "共有メモリオブジェクトの所有権を変更する。"
6974
6975 #. type: TP
6976 #: build/C/man7/shm_overview.7:79
6977 #, no-wrap
6978 msgid "B<fchmod>(2)"
6979 msgstr "B<fchmod>(2)"
6980
6981 #. type: Plain text
6982 #: build/C/man7/shm_overview.7:82
6983 msgid "To change the permissions of a shared memory object."
6984 msgstr "共有メモリオブジェクトの許可属性を変更する。"
6985
6986 #. type: SS
6987 #: build/C/man7/shm_overview.7:82
6988 #, no-wrap
6989 msgid "Versions"
6990 msgstr "Versions"
6991
6992 #. type: Plain text
6993 #: build/C/man7/shm_overview.7:84
6994 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
6995 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
6996
6997 #. type: SS
6998 #: build/C/man7/shm_overview.7:84
6999 #, no-wrap
7000 msgid "Persistence"
7001 msgstr "持続性"
7002
7003 #. type: Plain text
7004 #: build/C/man7/shm_overview.7:89
7005 msgid ""
7006 "POSIX shared memory objects have kernel persistence: a shared memory object "
7007 "will exist until the system is shut down, or until all processes have "
7008 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
7009 msgstr ""
7010 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
7011 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
7012 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
7013
7014 #. type: SS
7015 #: build/C/man7/shm_overview.7:89
7016 #, no-wrap
7017 msgid "Linking"
7018 msgstr "リンク"
7019
7020 #. type: Plain text
7021 #: build/C/man7/shm_overview.7:94
7022 msgid ""
7023 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
7024 "to link against the real-time library, I<librt>."
7025 msgstr ""
7026 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
7027 "タイムライブラリ I<librt> とリンクしなければならない。"
7028
7029 #. type: SS
7030 #: build/C/man7/shm_overview.7:94
7031 #, no-wrap
7032 msgid "Accessing shared memory objects via the file system"
7033 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
7034
7035 #. type: Plain text
7036 #: build/C/man7/shm_overview.7:101
7037 msgid ""
7038 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
7039 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
7040 "supports the use of access control lists (ACLs)  to control the permissions "
7041 "of objects in the virtual file system."
7042 msgstr ""
7043 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
7044 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
7045 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
7046 "スト (ACL; access control lists) を使うことができる。"
7047
7048 #. type: Plain text
7049 #: build/C/man7/shm_overview.7:106
7050 msgid ""
7051 "Typically, processes must synchronize their access to a shared memory "
7052 "object, using, for example, POSIX semaphores."
7053 msgstr ""
7054 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
7055 "使ってプロセス間で同期をとらなければならない。"
7056
7057 #. type: Plain text
7058 #: build/C/man7/shm_overview.7:114
7059 msgid ""
7060 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
7061 "memory API.  POSIX shared memory provides a simpler, and better designed "
7062 "interface; on the other hand POSIX shared memory is somewhat less widely "
7063 "available (especially on older systems) than System V shared memory."
7064 msgstr ""
7065 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
7066 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
7067 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
7068 "システムが少ない (特に、古いシステムでは少ない)。"
7069
7070 #. type: Plain text
7071 #: build/C/man7/shm_overview.7:127
7072 msgid ""
7073 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7074 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7075 "B<shm_unlink>(3), B<sem_overview>(7)"
7076 msgstr ""
7077 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7078 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7079 "B<shm_unlink>(3), B<sem_overview>(7)"
7080
7081 #. type: TH
7082 #: build/C/man2/shmctl.2:43
7083 #, no-wrap
7084 msgid "SHMCTL"
7085 msgstr "SHMCTL"
7086
7087 #. type: TH
7088 #: build/C/man2/shmctl.2:43
7089 #, no-wrap
7090 msgid "2008-08-07"
7091 msgstr "2008-08-07"
7092
7093 #. type: Plain text
7094 #: build/C/man2/shmctl.2:46
7095 msgid "shmctl - shared memory control"
7096 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
7097
7098 #. type: Plain text
7099 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
7100 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
7101 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
7102
7103 #. type: Plain text
7104 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
7105 msgid "B<#include E<lt>sys/shm.hE<gt>>"
7106 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
7107
7108 #. type: Plain text
7109 #: build/C/man2/shmctl.2:53
7110 msgid ""
7111 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7112 msgstr ""
7113 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7114
7115 #. type: Plain text
7116 #: build/C/man2/shmctl.2:60
7117 msgid ""
7118 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
7119 "shared memory segment whose identifier is given in I<shmid>."
7120 msgstr ""
7121 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
7122 "指示した制御命令を実行する。"
7123
7124 #. type: Plain text
7125 #: build/C/man2/shmctl.2:65
7126 msgid ""
7127 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
7128 "I<E<lt>sys/shm.hE<gt>> as follows:"
7129 msgstr ""
7130 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
7131 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
7132
7133 #. type: Plain text
7134 #: build/C/man2/shmctl.2:79
7135 #, no-wrap
7136 msgid ""
7137 "struct shmid_ds {\n"
7138 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
7139 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
7140 "    time_t          shm_atime;   /* Last attach time */\n"
7141 "    time_t          shm_dtime;   /* Last detach time */\n"
7142 "    time_t          shm_ctime;   /* Last change time */\n"
7143 "    pid_t           shm_cpid;    /* PID of creator */\n"
7144 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
7145 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
7146 "    ...\n"
7147 "};\n"
7148 msgstr ""
7149 "struct shmid_ds {\n"
7150 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
7151 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
7152 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
7153 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
7154 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
7155 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
7156 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
7157 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
7158 "    ...\n"
7159 "};\n"
7160
7161 #. type: Plain text
7162 #: build/C/man2/shmctl.2:87
7163 msgid ""
7164 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
7165 "(the highlighted fields are settable using B<IPC_SET>):"
7166 msgstr ""
7167 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
7168 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
7169
7170 #. type: Plain text
7171 #: build/C/man2/shmctl.2:100
7172 #, no-wrap
7173 msgid ""
7174 "struct ipc_perm {\n"
7175 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
7176 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
7177 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
7178 "    uid_t          cuid;     /* Effective UID of creator */\n"
7179 "    gid_t          cgid;     /* Effective GID of creator */\n"
7180 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
7181 "                                SHM_LOCKED flags */\n"
7182 "    unsigned short __seq;    /* Sequence number */\n"
7183 "};\n"
7184 msgstr ""
7185 "struct ipc_perm {\n"
7186 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
7187 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
7188 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
7189 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
7190 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
7191 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
7192 "                                SHM_LOCKED フラグ */\n"
7193 "    unsigned short __seq;    /* シーケンス番号 */\n"
7194 "};\n"
7195
7196 #. type: Plain text
7197 #: build/C/man2/shmctl.2:106
7198 msgid "Valid values for I<cmd> are:"
7199 msgstr "I<cmd> として有効な値は以下の通り:"
7200
7201 #. type: TP
7202 #: build/C/man2/shmctl.2:107
7203 #, no-wrap
7204 msgid "B<IPC_STAT>"
7205 msgstr "B<IPC_STAT>"
7206
7207 #. type: Plain text
7208 #: build/C/man2/shmctl.2:116
7209 msgid ""
7210 "Copy information from the kernel data structure associated with I<shmid> "
7211 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
7212 "read permission on the shared memory segment."
7213 msgstr ""
7214 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
7215 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
7216 "読み込み許可を持たなければならない。"
7217
7218 #. type: TP
7219 #: build/C/man2/shmctl.2:116
7220 #, no-wrap
7221 msgid "B<IPC_SET>"
7222 msgstr "B<IPC_SET>"
7223
7224 #. type: Plain text
7225 #: build/C/man2/shmctl.2:134
7226 msgid ""
7227 "Write the values of some members of the I<shmid_ds> structure pointed to by "
7228 "I<buf> to the kernel data structure associated with this shared memory "
7229 "segment, updating also its I<shm_ctime> member.  The following fields can be "
7230 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
7231 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
7232 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
7233 "memory segment, or the caller must be privileged."
7234 msgstr ""
7235 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
7236 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
7237 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
7238 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
7239 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
7240 "と一致するか、呼び出し元が特権を持たなければならない。"
7241
7242 #. type: TP
7243 #: build/C/man2/shmctl.2:134
7244 #, no-wrap
7245 msgid "B<IPC_RMID>"
7246 msgstr "B<IPC_RMID>"
7247
7248 #. type: Plain text
7249 #: build/C/man2/shmctl.2:151
7250 msgid ""
7251 "Mark the segment to be destroyed.  The segment will only actually be "
7252 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
7253 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
7254 "the owner or creator, or be privileged.  If a segment has been marked for "
7255 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
7256 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
7257 "be set."
7258 msgstr ""
7259 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
7260 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
7261 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
7262 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
7263 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
7264 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
7265
7266 #. type: Plain text
7267 #: build/C/man2/shmctl.2:154
7268 msgid ""
7269 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
7270 "its pages that were faulted in will remain in memory or swap."
7271 msgstr ""
7272 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
7273 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
7274 "る。"
7275
7276 #. type: TP
7277 #: build/C/man2/shmctl.2:154
7278 #, no-wrap
7279 msgid "B<IPC_INFO> (Linux-specific)"
7280 msgstr "B<IPC_INFO> (Linux 固有)"
7281
7282 #. type: Plain text
7283 #: build/C/man2/shmctl.2:167
7284 msgid ""
7285 "Returns information about system-wide shared memory limits and parameters in "
7286 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
7287 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
7288 "B<_GNU_SOURCE> feature test macro is defined:"
7289 msgstr ""
7290 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
7291 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
7292 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7293 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7294
7295 #. type: Plain text
7296 #: build/C/man2/shmctl.2:181
7297 #, no-wrap
7298 msgid ""
7299 "struct  shminfo {\n"
7300 "    unsigned long shmmax; /* Maximum segment size */\n"
7301 "    unsigned long shmmin; /* Minimum segment size;\n"
7302 "                             always 1 */\n"
7303 "    unsigned long shmmni; /* Maximum number of segments */\n"
7304 "    unsigned long shmseg; /* Maximum number of segments\n"
7305 "                             that a process can attach;\n"
7306 "                             unused within kernel */\n"
7307 "    unsigned long shmall; /* Maximum number of pages of\n"
7308 "                             shared memory, system-wide */\n"
7309 "};\n"
7310 msgstr ""
7311 "struct  shminfo {\n"
7312 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
7313 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
7314 "                             常に 1 */\n"
7315 "    unsigned long shmmni; /* 最大セグメント数 */\n"
7316 "    unsigned long shmseg; /* プロセスが付加できる\n"
7317 "                             セグメントの最大数。\n"
7318 "                             カーネル内では未使用 */\n"
7319 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
7320 "                             システム全体での値 */\n"
7321 "};\n"
7322
7323 #. type: Plain text
7324 #: build/C/man2/shmctl.2:194
7325 msgid ""
7326 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
7327 "files of the same name; see B<proc>(5)  for details."
7328 msgstr ""
7329 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
7330 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
7331
7332 #. type: TP
7333 #: build/C/man2/shmctl.2:194
7334 #, no-wrap
7335 msgid "B<SHM_INFO> (Linux-specific)"
7336 msgstr "B<SHM_INFO> (Linux 固有)"
7337
7338 #. type: Plain text
7339 #: build/C/man2/shmctl.2:205
7340 msgid ""
7341 "Returns a I<shm_info> structure whose fields contain information about "
7342 "system resources consumed by shared memory.  This structure is defined in "
7343 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
7344 msgstr ""
7345 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
7346 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7347 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7348
7349 #. type: Plain text
7350 #: build/C/man2/shmctl.2:222
7351 #, no-wrap
7352 msgid ""
7353 "struct shm_info {\n"
7354 "    int           used_ids; /* # of currently existing\n"
7355 "                               segments */\n"
7356 "    unsigned long shm_tot;  /* Total number of shared\n"
7357 "                               memory pages */\n"
7358 "    unsigned long shm_rss;  /* # of resident shared\n"
7359 "                               memory pages */\n"
7360 "    unsigned long shm_swp;  /* # of swapped shared\n"
7361 "                               memory pages */\n"
7362 "    unsigned long swap_attempts;\n"
7363 "                            /* Unused since Linux 2.4 */\n"
7364 "    unsigned long swap_successes;\n"
7365 "                            /* Unused since Linux 2.4 */\n"
7366 "};\n"
7367 msgstr ""
7368 "struct shm_info {\n"
7369 "    int           used_ids; /* 現在存在するセグメント数 */\n"
7370 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
7371 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
7372 "                               いない) 共有メモリページ数 */\n"
7373 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
7374 "                               ページ数 */\n"
7375 "    unsigned long swap_attempts;\n"
7376 "                            /* Linux 2.4 以降では未使用 */\n"
7377 "    unsigned long swap_successes;\n"
7378 "                            /* Linux 2.4 以降では未使用 */\n"
7379 "};\n"
7380
7381 #. type: TP
7382 #: build/C/man2/shmctl.2:224
7383 #, no-wrap
7384 msgid "B<SHM_STAT> (Linux-specific)"
7385 msgstr "B<SHM_STAT> (Linux 固有)"
7386
7387 #. type: Plain text
7388 #: build/C/man2/shmctl.2:235
7389 msgid ""
7390 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
7391 "argument is not a segment identifier, but instead an index into the kernel's "
7392 "internal array that maintains information about all shared memory segments "
7393 "on the system."
7394 msgstr ""
7395 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
7396 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
7397 "管理するカーネルの内部配列へのインデックス である。"
7398
7399 #. type: Plain text
7400 #: build/C/man2/shmctl.2:238
7401 msgid ""
7402 "The caller can prevent or allow swapping of a shared memory segment with the "
7403 "following I<cmd> values:"
7404 msgstr ""
7405 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
7406 "ワップされることを防止したり、許可したりできる:"
7407
7408 #. type: TP
7409 #: build/C/man2/shmctl.2:239
7410 #, no-wrap
7411 msgid "B<SHM_LOCK> (Linux-specific)"
7412 msgstr "B<SHM_LOCK> (Linux 固有)"
7413
7414 #. type: Plain text
7415 #: build/C/man2/shmctl.2:251
7416 msgid ""
7417 "Prevent swapping of the shared memory segment.  The caller must fault in any "
7418 "pages that are required to be present after locking is enabled.  If a "
7419 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
7420 "I<shm_perm.mode> field in the associated data structure retrieved by "
7421 "B<IPC_STAT> will be set."
7422 msgstr ""
7423 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
7424 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
7425 "らない。 セグメントがロックされると、 関連するデータ構造体において "
7426 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
7427 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
7428
7429 #. type: TP
7430 #: build/C/man2/shmctl.2:251
7431 #, no-wrap
7432 msgid "B<SHM_UNLOCK> (Linux-specific)"
7433 msgstr "B<SHM_UNLOCK> (Linux 固有)"
7434
7435 #. type: Plain text
7436 #: build/C/man2/shmctl.2:254
7437 msgid "Unlock the segment, allowing it to be swapped out."
7438 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
7439
7440 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
7441 #.  be applied to a segment, regardless of ownership of the segment.
7442 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
7443 #.  in 2.6.10.  MTK, May 2005
7444 #. type: Plain text
7445 #: build/C/man2/shmctl.2:272
7446 msgid ""
7447 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
7448 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
7449 "these operations if its effective UID matches the owner or creator UID of "
7450 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
7451 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
7452 msgstr ""
7453 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
7454 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
7455 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
7456 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
7457 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
7458 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
7459
7460 #. type: Plain text
7461 #: build/C/man2/shmctl.2:290
7462 msgid ""
7463 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
7464 "highest used entry in the kernel's internal array recording information "
7465 "about all shared memory segments.  (This information can be used with "
7466 "repeated B<SHM_STAT> operations to obtain information about all shared "
7467 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
7468 "the identifier of the shared memory segment whose index was given in "
7469 "I<shmid>.  Other operations return 0 on success."
7470 msgstr ""
7471 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
7472 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
7473 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
7474 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
7475 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
7476 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
7477
7478 #. type: Plain text
7479 #: build/C/man2/shmctl.2:294
7480 msgid "On error, -1 is returned, and I<errno> is set appropriately."
7481 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
7482
7483 #. type: Plain text
7484 #: build/C/man2/shmctl.2:303
7485 msgid ""
7486 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
7487 "read access for I<shmid>, and the calling process does not have the "
7488 "B<CAP_IPC_OWNER> capability."
7489 msgstr ""
7490 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
7491 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
7492 "ケーパビリティ (capability) を持っていない。"
7493
7494 #. type: Plain text
7495 #: build/C/man2/shmctl.2:314
7496 msgid ""
7497 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
7498 "pointed to by I<buf> isn't accessible."
7499 msgstr ""
7500 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
7501 "るアドレスにアクセスできない。"
7502
7503 #. type: TP
7504 #: build/C/man2/shmctl.2:314
7505 #, no-wrap
7506 msgid "B<EIDRM>"
7507 msgstr "B<EIDRM>"
7508
7509 #. type: Plain text
7510 #: build/C/man2/shmctl.2:317
7511 msgid "I<shmid> points to a removed identifier."
7512 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
7513
7514 #. type: Plain text
7515 #: build/C/man2/shmctl.2:326
7516 msgid ""
7517 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
7518 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
7519 "to an array slot that is currently unused."
7520 msgstr ""
7521 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
7522 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
7523 "配列のスロットを参照していた。"
7524
7525 #. type: Plain text
7526 #: build/C/man2/shmctl.2:337
7527 msgid ""
7528 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
7529 "be-locked segment would mean that the total bytes in locked shared memory "
7530 "segments would exceed the limit for the real user ID of the calling "
7531 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
7532 "(see B<setrlimit>(2))."
7533 msgstr ""
7534 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
7535 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
7536 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
7537 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
7538
7539 #. type: TP
7540 #: build/C/man2/shmctl.2:337
7541 #, no-wrap
7542 msgid "B<EOVERFLOW>"
7543 msgstr "B<EOVERFLOW>"
7544
7545 #. type: Plain text
7546 #: build/C/man2/shmctl.2:342
7547 msgid ""
7548 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
7549 "in the structure pointed to by I<buf>."
7550 msgstr ""
7551 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
7552 "には大き過ぎる。"
7553
7554 #. type: Plain text
7555 #: build/C/man2/shmctl.2:354
7556 msgid ""
7557 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
7558 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
7559 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
7560 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
7561 msgstr ""
7562 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
7563 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
7564 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
7565
7566 #. type: Plain text
7567 #: build/C/man2/shmctl.2:366
7568 msgid ""
7569 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
7570 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
7571 "capability).  (Since Linux 2.6.9, this error can also occur if the "
7572 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
7573 msgstr ""
7574 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
7575 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
7576 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
7577 "が特権を持たない場合にも、このエラーが起こる。)"
7578
7579 #.  SVr4 documents an additional error condition EMFILE.
7580 #. type: Plain text
7581 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
7582 #: build/C/man2/shmop.2:229
7583 msgid "SVr4, POSIX.1-2001."
7584 msgstr "SVr4, POSIX.1-2001."
7585
7586 #. type: Plain text
7587 #: build/C/man2/shmctl.2:382
7588 msgid ""
7589 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
7590 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
7591 "future these may modified or moved to a /proc file system interface."
7592 msgstr ""
7593 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
7594 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
7595 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
7596
7597 #. type: Plain text
7598 #: build/C/man2/shmctl.2:390
7599 msgid ""
7600 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
7601 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
7602 "feature is not available on other UNIX implementations; portable "
7603 "applications should avoid relying on it."
7604 msgstr ""
7605 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
7606 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
7607 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
7608 "プリケーションではこれに依存しないようにすべきである。"
7609
7610 #. type: Plain text
7611 #: build/C/man2/shmctl.2:403
7612 msgid ""
7613 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
7614 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
7615 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
7616 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
7617 msgstr ""
7618 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
7619 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
7620 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
7621 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
7622
7623 #. type: Plain text
7624 #: build/C/man2/shmctl.2:410
7625 msgid ""
7626 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7627 "B<svipc>(7)"
7628 msgstr ""
7629 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
7630 "B<shm_overview>(7), B<svipc>(7)"
7631
7632 #. type: TH
7633 #: build/C/man2/shmget.2:36
7634 #, no-wrap
7635 msgid "SHMGET"
7636 msgstr "SHMGET"
7637
7638 #. type: TH
7639 #: build/C/man2/shmget.2:36
7640 #, no-wrap
7641 msgid "2006-05-02"
7642 msgstr "2006-05-02"
7643
7644 #. type: Plain text
7645 #: build/C/man2/shmget.2:39
7646 msgid "shmget - allocates a shared memory segment"
7647 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
7648
7649 #. type: Plain text
7650 #: build/C/man2/shmget.2:46
7651 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7652 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
7653
7654 #. type: Plain text
7655 #: build/C/man2/shmget.2:70
7656 msgid ""
7657 "B<shmget>()  returns the identifier of the shared memory segment associated "
7658 "with the value of the argument I<key>.  A new shared memory segment, with "
7659 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
7660 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
7661 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
7662 "B<IPC_CREAT> is specified in I<shmflg>."
7663 msgstr ""
7664 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
7665 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
7666 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
7667 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
7668 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
7669 "となる。"
7670
7671 #. type: Plain text
7672 #: build/C/man2/shmget.2:89
7673 msgid ""
7674 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
7675 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
7676 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
7677 "| O_EXCL> for B<open>(2).)"
7678 msgstr ""
7679 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
7680 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
7681 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
7682 "O_EXCL> を指定した場合の動作と同じである)。"
7683
7684 #. type: Plain text
7685 #: build/C/man2/shmget.2:93
7686 msgid "The value I<shmflg> is composed of:"
7687 msgstr "I<shmflg> は以下の内容から構成される:"
7688
7689 #. type: TP
7690 #: build/C/man2/shmget.2:93
7691 #, no-wrap
7692 msgid "B<IPC_CREAT>"
7693 msgstr "B<IPC_CREAT>"
7694
7695 #. type: Plain text
7696 #: build/C/man2/shmget.2:100
7697 msgid ""
7698 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
7699 "find the segment associated with I<key> and check to see if the user has "
7700 "permission to access the segment."
7701 msgstr ""
7702 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
7703 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
7704 "可があるかどうかをチェックする。"
7705
7706 #. type: TP
7707 #: build/C/man2/shmget.2:100
7708 #, no-wrap
7709 msgid "B<IPC_EXCL>"
7710 msgstr "B<IPC_EXCL>"
7711
7712 #. type: Plain text
7713 #: build/C/man2/shmget.2:103
7714 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
7715 msgstr ""
7716 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
7717 "証する。"
7718
7719 #. type: TP
7720 #: build/C/man2/shmget.2:103
7721 #, no-wrap
7722 msgid "I<mode_flags>"
7723 msgstr "I<mode_flags>"
7724
7725 #. type: Plain text
7726 #: build/C/man2/shmget.2:113
7727 msgid ""
7728 "(least significant 9 bits)  specifying the permissions granted to the owner, "
7729 "group, and world.  These bits have the same format, and the same meaning, as "
7730 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
7731 "not used by the system."
7732 msgstr ""
7733 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
7734 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
7735 "ろ、システムは実行 (execute) 許可を参照しない。"
7736
7737 #. type: TP
7738 #: build/C/man2/shmget.2:113
7739 #, no-wrap
7740 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
7741 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
7742
7743 #. type: Plain text
7744 #: build/C/man2/shmget.2:119
7745 msgid ""
7746 "Allocate the segment using \"huge pages.\" See the kernel source file "
7747 "I<Documentation/vm/hugetlbpage.txt> for further information."
7748 msgstr ""
7749 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
7750 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
7751
7752 #. type: TP
7753 #: build/C/man2/shmget.2:119
7754 #, no-wrap
7755 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
7756 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
7757
7758 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
7759 #.  specified.
7760 #. type: Plain text
7761 #: build/C/man2/shmget.2:138
7762 msgid ""
7763 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
7764 "Do not reserve swap space for this segment.  When swap space is reserved, "
7765 "one has the guarantee that it is possible to modify the segment.  When swap "
7766 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
7767 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
7768 "overcommit_memory> in B<proc>(5)."
7769 msgstr ""
7770 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
7771 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
7772 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
7773 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
7774 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
7775 "ルに関する議論も参照のこと。"
7776
7777 #. type: Plain text
7778 #: build/C/man2/shmget.2:146
7779 msgid ""
7780 "When a new shared memory segment is created, its contents are initialized to "
7781 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
7782 "(2)), is initialized as follows:"
7783 msgstr ""
7784 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
7785 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
7786 "期化される。"
7787
7788 #. type: Plain text
7789 #: build/C/man2/shmget.2:151
7790 msgid ""
7791 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
7792 "calling process."
7793 msgstr ""
7794 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
7795 "ユーザーID を設定する。"
7796
7797 #. type: Plain text
7798 #: build/C/man2/shmget.2:156
7799 msgid ""
7800 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
7801 "the calling process."
7802 msgstr ""
7803 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
7804 "定する。"
7805
7806 #. type: Plain text
7807 #: build/C/man2/shmget.2:161
7808 msgid ""
7809 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
7810 "significant 9 bit of I<shmflg>."
7811 msgstr ""
7812 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
7813
7814 #. type: Plain text
7815 #: build/C/man2/shmget.2:165
7816 msgid "I<shm_segsz> is set to the value of I<size>."
7817 msgstr "I<shm_segsz> に I<size> の値を設定する。"
7818
7819 #. type: Plain text
7820 #: build/C/man2/shmget.2:172
7821 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
7822 msgstr ""
7823 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
7824
7825 #. type: Plain text
7826 #: build/C/man2/shmget.2:175
7827 msgid "I<shm_ctime> is set to the current time."
7828 msgstr "I<shm_ctime> に現在の時刻を設定する。"
7829
7830 #. type: Plain text
7831 #: build/C/man2/shmget.2:178
7832 msgid ""
7833 "If the shared memory segment already exists, the permissions are verified, "
7834 "and a check is made to see if it is marked for destruction."
7835 msgstr ""
7836 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
7837 "(destruction) マークがつけられていないかのチェックが行われる。"
7838
7839 #. type: Plain text
7840 #: build/C/man2/shmget.2:182
7841 msgid ""
7842 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
7843 msgstr ""
7844 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
7845 "が返される。"
7846
7847 #. type: Plain text
7848 #: build/C/man2/shmget.2:186
7849 msgid "On failure, I<errno> is set to one of the following:"
7850 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
7851
7852 #. type: Plain text
7853 #: build/C/man2/shmget.2:192
7854 msgid ""
7855 "The user does not have permission to access the shared memory segment, and "
7856 "does not have the B<CAP_IPC_OWNER> capability."
7857 msgstr ""
7858 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
7859 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
7860
7861 #. type: Plain text
7862 #: build/C/man2/shmget.2:196
7863 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
7864 msgstr ""
7865 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
7866
7867 #. type: Plain text
7868 #: build/C/man2/shmget.2:202
7869 msgid ""
7870 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
7871 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
7872 "existed, but I<size> is greater than the size of that segment."
7873 msgstr ""
7874 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
7875 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
7876 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
7877 "在するセグメントの サイズよりも大きかった。"
7878
7879 #. type: Plain text
7880 #: build/C/man2/shmget.2:211
7881 msgid ""
7882 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
7883 msgstr ""
7884 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
7885 "いなかった。"
7886
7887 #. type: Plain text
7888 #: build/C/man2/shmget.2:214
7889 msgid "No memory could be allocated for segment overhead."
7890 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
7891
7892 #. type: Plain text
7893 #: build/C/man2/shmget.2:222
7894 msgid ""
7895 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
7896 "segment of the requested I<size> would cause the system to exceed the system-"
7897 "wide limit on shared memory (B<SHMALL>)."
7898 msgstr ""
7899 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
7900 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
7901 "限 (B<SHMALL>)  を超過した。"
7902
7903 #. type: Plain text
7904 #: build/C/man2/shmget.2:229
7905 msgid ""
7906 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
7907 "(did not have the B<CAP_IPC_LOCK> capability)."
7908 msgstr ""
7909 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
7910 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
7911
7912 #. type: Plain text
7913 #: build/C/man2/shmget.2:235
7914 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
7915 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
7916
7917 #. type: Plain text
7918 #: build/C/man2/shmget.2:245
7919 msgid ""
7920 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
7921 "value is used for I<key>, the system call ignores everything but the least "
7922 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
7923 "success)."
7924 msgstr ""
7925 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
7926 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
7927 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
7928
7929 #. type: Plain text
7930 #: build/C/man2/shmget.2:249
7931 msgid ""
7932 "The following limits on shared memory segment resources affect the B<shmget>"
7933 "()  call:"
7934 msgstr ""
7935 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
7936 "る:"
7937
7938 #. type: TP
7939 #: build/C/man2/shmget.2:249
7940 #, no-wrap
7941 msgid "B<SHMALL>"
7942 msgstr "B<SHMALL>"
7943
7944 #. type: Plain text
7945 #: build/C/man2/shmget.2:254
7946 msgid ""
7947 "System wide maximum of shared memory pages (on Linux, this limit can be read "
7948 "and modified via I</proc/sys/kernel/shmall>)."
7949 msgstr ""
7950 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
7951 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
7952
7953 #. type: TP
7954 #: build/C/man2/shmget.2:254
7955 #, no-wrap
7956 msgid "B<SHMMAX>"
7957 msgstr "B<SHMMAX>"
7958
7959 #. type: Plain text
7960 #: build/C/man2/shmget.2:259
7961 msgid ""
7962 "Maximum size in bytes for a shared memory segment: policy dependent (on "
7963 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
7964 msgstr ""
7965 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
7966 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
7967
7968 #. type: TP
7969 #: build/C/man2/shmget.2:259
7970 #, no-wrap
7971 msgid "B<SHMMIN>"
7972 msgstr "B<SHMMIN>"
7973
7974 #. type: Plain text
7975 #: build/C/man2/shmget.2:265
7976 msgid ""
7977 "Minimum size in bytes for a shared memory segment: implementation dependent "
7978 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
7979 msgstr ""
7980 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
7981 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
7982
7983 #. type: TP
7984 #: build/C/man2/shmget.2:265
7985 #, no-wrap
7986 msgid "B<SHMMNI>"
7987 msgstr "B<SHMMNI>"
7988
7989 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
7990 #.  that we could create one more segment than SHMMNI -- MTK
7991 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
7992 #. type: Plain text
7993 #: build/C/man2/shmget.2:274
7994 msgid ""
7995 "System wide maximum number of shared memory segments: implementation "
7996 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
7997 "can be read and modified via I</proc/sys/kernel/shmmni>)."
7998 msgstr ""
7999 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
8000 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
8001 "したり、変更したりできる)。"
8002
8003 #. type: Plain text
8004 #: build/C/man2/shmget.2:278
8005 msgid ""
8006 "The implementation has no specific limits for the per-process maximum number "
8007 "of shared memory segments (B<SHMSEG>)."
8008 msgstr ""
8009 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
8010 "上の制限はない。"
8011
8012 #. type: Plain text
8013 #: build/C/man2/shmget.2:284
8014 msgid ""
8015 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
8016 "shared memory segment scheduled for deletion."
8017 msgstr ""
8018 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
8019 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
8020
8021 #. type: Plain text
8022 #: build/C/man2/shmget.2:290
8023 msgid ""
8024 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
8025 "more clearly show its function."
8026 msgstr ""
8027 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
8028 "より明確にその機能を表しているだろう。"
8029
8030 #. type: Plain text
8031 #: build/C/man2/shmget.2:298
8032 msgid ""
8033 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8034 "B<shm_overview>(7), B<svipc>(7)"
8035 msgstr ""
8036 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8037 "B<shm_overview>(7), B<svipc>(7)"
8038
8039 #. type: TH
8040 #: build/C/man2/shmop.2:39
8041 #, no-wrap
8042 msgid "SHMOP"
8043 msgstr "SHMOP"
8044
8045 #. type: TH
8046 #: build/C/man2/shmop.2:39
8047 #, no-wrap
8048 msgid "2008-06-03"
8049 msgstr "2008-06-03"
8050
8051 #. type: Plain text
8052 #: build/C/man2/shmop.2:42
8053 msgid "shmat, shmdt - shared memory operations"
8054 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
8055
8056 #. type: Plain text
8057 #: build/C/man2/shmop.2:46
8058 #, no-wrap
8059 msgid ""
8060 "B<#include E<lt>sys/types.hE<gt>>\n"
8061 "B<#include E<lt>sys/shm.hE<gt>>\n"
8062 msgstr ""
8063 "B<#include E<lt>sys/types.hE<gt>>\n"
8064 "B<#include E<lt>sys/shm.hE<gt>>\n"
8065
8066 #. type: Plain text
8067 #: build/C/man2/shmop.2:48
8068 #, no-wrap
8069 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8070 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8071
8072 #. type: Plain text
8073 #: build/C/man2/shmop.2:50
8074 #, no-wrap
8075 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8076 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8077
8078 #. type: Plain text
8079 #: build/C/man2/shmop.2:59
8080 msgid ""
8081 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
8082 "address space of the calling process.  The attaching address is specified by "
8083 "I<shmaddr> with one of the following criteria:"
8084 msgstr ""
8085 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
8086 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
8087 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
8088
8089 #. type: Plain text
8090 #: build/C/man2/shmop.2:65
8091 msgid ""
8092 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
8093 "which to attach the segment."
8094 msgstr ""
8095 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
8096 "されていない) アドレスを選択する。"
8097
8098 #. type: Plain text
8099 #: build/C/man2/shmop.2:80
8100 msgid ""
8101 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
8102 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
8103 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
8104 "at which the attach occurs."
8105 msgstr ""
8106 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
8107 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
8108 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
8109 "を指している必要がある。"
8110
8111 #. type: Plain text
8112 #: build/C/man2/shmop.2:90
8113 msgid ""
8114 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
8115 "reading and the process must have read permission for the segment.  "
8116 "Otherwise the segment is attached for read and write and the process must "
8117 "have read and write permission for the segment.  There is no notion of a "
8118 "write-only shared memory segment."
8119 msgstr ""
8120 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
8121 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
8122 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
8123 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
8124 "の共有メモリ・セグメントという概念は存在しない。"
8125
8126 #. type: Plain text
8127 #: build/C/man2/shmop.2:105
8128 msgid ""
8129 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
8130 "indicate that the mapping of the segment should replace any existing mapping "
8131 "in the range starting at I<shmaddr> and continuing for the size of the "
8132 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
8133 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
8134 msgstr ""
8135 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
8136 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
8137 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
8138 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
8139 "場合は、 I<shmaddr> が NULL であってはならない。"
8140
8141 #. type: Plain text
8142 #: build/C/man2/shmop.2:112
8143 msgid ""
8144 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
8145 "The segment will automatically be detached at process exit.  The same "
8146 "segment may be attached as a read and as a read-write one, and more than "
8147 "once, in the process's address space."
8148 msgstr ""
8149 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
8150 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
8151 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
8152 "複数回付加することもできる。"
8153
8154 #. type: Plain text
8155 #: build/C/man2/shmop.2:120
8156 msgid ""
8157 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
8158 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
8159 "follows:"
8160 msgstr ""
8161 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
8162 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
8163
8164 #. type: Plain text
8165 #: build/C/man2/shmop.2:123
8166 msgid "I<shm_atime> is set to the current time."
8167 msgstr "I<shm_atime> には現在の時刻を設定する。"
8168
8169 #. type: Plain text
8170 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
8171 msgid "I<shm_lpid> is set to the process-ID of the calling process."
8172 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
8173
8174 #. type: Plain text
8175 #: build/C/man2/shmop.2:129
8176 msgid "I<shm_nattch> is incremented by one."
8177 msgstr "I<shm_nattch> を 1 増加させる。"
8178
8179 #. type: Plain text
8180 #: build/C/man2/shmop.2:140
8181 msgid ""
8182 "B<shmdt>()  detaches the shared memory segment located at the address "
8183 "specified by I<shmaddr> from the address space of the calling process.  The "
8184 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
8185 "the value returned by the attaching B<shmat>()  call."
8186 msgstr ""
8187 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
8188 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
8189 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
8190 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
8191 "ない。"
8192
8193 #. type: Plain text
8194 #: build/C/man2/shmop.2:146
8195 msgid ""
8196 "On a successful B<shmdt>()  call the system updates the members of the "
8197 "I<shmid_ds> structure associated with the shared memory segment as follows:"
8198 msgstr ""
8199 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
8200 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
8201
8202 #. type: Plain text
8203 #: build/C/man2/shmop.2:149
8204 msgid "I<shm_dtime> is set to the current time."
8205 msgstr "I<shm_dtime> には現在の時刻が設定される。"
8206
8207 #. type: Plain text
8208 #: build/C/man2/shmop.2:157
8209 msgid ""
8210 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
8211 "marked for deletion, the segment is deleted."
8212 msgstr ""
8213 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
8214 "セグメントは削除される。"
8215
8216 #. type: Plain text
8217 #: build/C/man2/shmop.2:161
8218 msgid ""
8219 "After a B<fork>(2)  the child inherits the attached shared memory segments."
8220 msgstr ""
8221 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
8222
8223 #. type: Plain text
8224 #: build/C/man2/shmop.2:165
8225 msgid ""
8226 "After an B<execve>(2)  all attached shared memory segments are detached from "
8227 "the process."
8228 msgstr ""
8229 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
8230 "される。"
8231
8232 #. type: Plain text
8233 #: build/C/man2/shmop.2:169
8234 msgid ""
8235 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
8236 "process."
8237 msgstr ""
8238 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
8239 "離される。"
8240
8241 #. type: Plain text
8242 #: build/C/man2/shmop.2:177
8243 msgid ""
8244 "On success B<shmat>()  returns the address of the attached shared memory "
8245 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
8246 "indicate the cause of the error."
8247 msgstr ""
8248 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
8249 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
8250 "値を設定する。"
8251
8252 #. type: Plain text
8253 #: build/C/man2/shmop.2:183
8254 msgid ""
8255 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
8256 "set to indicate the cause of the error."
8257 msgstr ""
8258 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
8259 "ラーの原因を示す値を設定する。"
8260
8261 #. type: Plain text
8262 #: build/C/man2/shmop.2:189
8263 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
8264 msgstr ""
8265 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
8266
8267 #. type: Plain text
8268 #: build/C/man2/shmop.2:195
8269 msgid ""
8270 "The calling process does not have the required permissions for the requested "
8271 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
8272 msgstr ""
8273 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
8274 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
8275
8276 #. type: Plain text
8277 #: build/C/man2/shmop.2:209
8278 msgid ""
8279 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
8280 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
8281 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
8282 msgstr ""
8283 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
8284 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
8285 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
8286 "れているが、 I<shmaddr> が NULL であった。"
8287
8288 #. type: Plain text
8289 #: build/C/man2/shmop.2:212
8290 msgid "Could not allocate memory for the descriptor or for the page tables."
8291 msgstr ""
8292 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
8293 "とができない。"
8294
8295 #. type: Plain text
8296 #: build/C/man2/shmop.2:218
8297 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
8298 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
8299
8300 #.  The following since 2.6.17-rc1:
8301 #. type: Plain text
8302 #: build/C/man2/shmop.2:226
8303 msgid ""
8304 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
8305 "not aligned on a page boundary."
8306 msgstr ""
8307 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
8308 "I<shmaddr> がページ境界に合っていない。"
8309
8310 #. type: Plain text
8311 #: build/C/man2/shmop.2:245
8312 msgid ""
8313 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
8314 "changed from I<char *> into I<const void *>, and the returned type of "
8315 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
8316 "I<char *> prototypes; glibc2 has I<void *>.)"
8317 msgstr ""
8318 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
8319 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
8320 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
8321 "glibc2 のプロトタイプは I<void *> である)。"
8322
8323 #. type: Plain text
8324 #: build/C/man2/shmop.2:257
8325 msgid ""
8326 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
8327 "way of attaching a shared memory segment.  Be aware that the shared memory "
8328 "segment attached in this way may be attached at different addresses in "
8329 "different processes.  Therefore, any pointers maintained within the shared "
8330 "memory must be made relative (typically to the starting address of the "
8331 "segment), rather than absolute."
8332 msgstr ""
8333 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
8334 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
8335 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
8336 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
8337 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
8338 "る。"
8339
8340 #. type: Plain text
8341 #: build/C/man2/shmop.2:262
8342 msgid ""
8343 "On Linux, it is possible to attach a shared memory segment even if it is "
8344 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
8345 "behavior and many other implementations do not support it."
8346 msgstr ""
8347 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
8348 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
8349 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
8350
8351 #. type: Plain text
8352 #: build/C/man2/shmop.2:265
8353 msgid "The following system parameter affects B<shmat>():"
8354 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
8355
8356 #.  FIXME A good explanation of the rationale for the existence
8357 #.  of SHMLBA would be useful here
8358 #. type: TP
8359 #: build/C/man2/shmop.2:265
8360 #, no-wrap
8361 msgid "B<SHMLBA>"
8362 msgstr "B<SHMLBA>"
8363
8364 #.  FIXME That last sentence isn't true for all Linux
8365 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
8366 #.  -- MTK, Nov 04
8367 #. type: Plain text
8368 #: build/C/man2/shmop.2:278
8369 msgid ""
8370 "Segment low boundary address multiple.  Must be page aligned.  For the "
8371 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
8372 msgstr ""
8373 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
8374 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
8375
8376 #. type: Plain text
8377 #: build/C/man2/shmop.2:282
8378 msgid ""
8379 "The implementation places no intrinsic limit on the per-process maximum "
8380 "number of shared memory segments (B<SHMSEG>)."
8381 msgstr ""
8382 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
8383 "関する実装依存の制限はない。"
8384
8385 #. type: Plain text
8386 #: build/C/man2/shmop.2:290
8387 msgid ""
8388 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8389 "B<shm_overview>(7), B<svipc>(7)"
8390 msgstr ""
8391 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8392 "B<shm_overview>(7), B<svipc>(7)"
8393
8394 #. type: TH
8395 #: build/C/man2/subpage_prot.2:28
8396 #, no-wrap
8397 msgid "SUBPAGE_PROT"
8398 msgstr "SUBPAGE_PROT"
8399
8400 #. type: TH
8401 #: build/C/man2/subpage_prot.2:28
8402 #, no-wrap
8403 msgid "2010-10-30"
8404 msgstr "2010-10-30"
8405
8406 #. type: Plain text
8407 #: build/C/man2/subpage_prot.2:31
8408 msgid "subpage_prot - define a subpage protection for an address range"
8409 msgstr ""
8410
8411 #. type: Plain text
8412 #: build/C/man2/subpage_prot.2:35
8413 #, no-wrap
8414 msgid ""
8415 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8416 "B<                  uint32_t *>I<map>B<);>\n"
8417 msgstr ""
8418 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8419 "B<                  uint32_t *>I<map>B<);>\n"
8420
8421 #. type: Plain text
8422 #: build/C/man2/subpage_prot.2:42
8423 msgid ""
8424 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
8425 "control the access permissions on individual 4kB subpages on systems "
8426 "configured with a page size of 64kB."
8427 msgstr ""
8428
8429 #. type: Plain text
8430 #: build/C/man2/subpage_prot.2:49
8431 msgid ""
8432 "The protection map is applied to the memory pages in the region starting at "
8433 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
8434 "aligned to a 64-kB boundary."
8435 msgstr ""
8436
8437 #. type: Plain text
8438 #: build/C/man2/subpage_prot.2:61
8439 msgid ""
8440 "The protection map is specified in the buffer pointed to by I<map>.  The map "
8441 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8442 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8443 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8444 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
8445 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8446 msgstr ""
8447
8448 #. type: Plain text
8449 #: build/C/man2/subpage_prot.2:66
8450 msgid ""
8451 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
8452 "specified below is returned."
8453 msgstr ""
8454
8455 #. type: Plain text
8456 #: build/C/man2/subpage_prot.2:72
8457 msgid "The buffer referred to by I<map> is not accessible."
8458 msgstr ""
8459
8460 #. type: Plain text
8461 #: build/C/man2/subpage_prot.2:82
8462 msgid ""
8463 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
8464 "be aligned to a multiple of the system page size, and they must not refer to "
8465 "a region outside of the address space of the process or to a region that "
8466 "consists of huge pages."
8467 msgstr ""
8468
8469 #. type: Plain text
8470 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
8471 msgid "Out of memory."
8472 msgstr "メモリ不足である。"
8473
8474 #. type: Plain text
8475 #: build/C/man2/subpage_prot.2:91
8476 msgid ""
8477 "This system call is provided on the PowerPC architecture since Linux "
8478 "2.6.25.  The system call is provided only if the kernel is configured with "
8479 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
8480 msgstr ""
8481
8482 #. type: Plain text
8483 #: build/C/man2/subpage_prot.2:98
8484 msgid ""
8485 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8486 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8487 "field won't allow writes to a page that is otherwise write-protected."
8488 msgstr ""
8489
8490 #. type: SS
8491 #: build/C/man2/subpage_prot.2:98
8492 #, no-wrap
8493 msgid "Rationale"
8494 msgstr ""
8495
8496 #.  In the initial implementation, it was the case that:
8497 #.      In fact the whole process is switched to use 4k hardware pages when the
8498 #.      subpage_prot system call is used, but this could be improved in future
8499 #.      to switch only the affected segments.
8500 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
8501 #.  the affected segment, not the whole process.
8502 #. type: Plain text
8503 #: build/C/man2/subpage_prot.2:120
8504 msgid ""
8505 "This system call is provided to assist writing emulators that operate using "
8506 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
8507 "uses a smaller page size, the emulator can no longer use the memory-"
8508 "management unit (MMU)  and normal system calls for controlling page "
8509 "protections.  (The emulator could emulate the MMU by checking and possibly "
8510 "remapping the address for each memory access in software, but that is "
8511 "slow.)  The idea is that the emulator supplies an array of protection masks "
8512 "to apply to a specified range of virtual addresses.  These masks are applied "
8513 "at the level where hardware page-table entries (PTEs)  are inserted into the "
8514 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
8515 "affected.  Implicit in this is that the regions of the address space that "
8516 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
8517 "hardware pages (on machines with hardware 64-kB page support)."
8518 msgstr ""
8519
8520 #. type: Plain text
8521 #: build/C/man2/subpage_prot.2:123
8522 msgid "B<mprotect>(2), B<syscall>(2);"
8523 msgstr ""
8524
8525 #. type: Plain text
8526 #: build/C/man2/subpage_prot.2:126
8527 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
8528 msgstr ""
8529
8530 #. type: TH
8531 #: build/C/man2/sync_file_range.2:30
8532 #, no-wrap
8533 msgid "SYNC_FILE_RANGE"
8534 msgstr "SYNC_FILE_RANGE"
8535
8536 #. type: Plain text
8537 #: build/C/man2/sync_file_range.2:33
8538 msgid "sync_file_range - sync a file segment with disk"
8539 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
8540
8541 #. type: Plain text
8542 #: build/C/man2/sync_file_range.2:37
8543 #, no-wrap
8544 msgid ""
8545 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
8546 "B<#include E<lt>fcntl.hE<gt>>\n"
8547 msgstr ""
8548 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
8549 "B<#include E<lt>fcntl.hE<gt>>\n"
8550
8551 #. type: Plain text
8552 #: build/C/man2/sync_file_range.2:40
8553 #, no-wrap
8554 msgid ""
8555 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8556 "B<                    unsigned int >I<flags>B<);>\n"
8557 msgstr ""
8558 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
8559 "B<                    unsigned int >I<flags>B<);>\n"
8560
8561 #. type: Plain text
8562 #: build/C/man2/sync_file_range.2:47
8563 msgid ""
8564 "B<sync_file_range>()  permits fine control when synchronizing the open file "
8565 "referred to by the file descriptor I<fd> with disk."
8566 msgstr ""
8567 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
8568 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
8569
8570 #. type: Plain text
8571 #: build/C/man2/sync_file_range.2:61
8572 msgid ""
8573 "I<offset> is the starting byte of the file range to be synchronized.  "
8574 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
8575 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
8576 "are synchronized.  Synchronization is in units of the system page size: "
8577 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
8578 "rounded up to a page boundary."
8579 msgstr ""
8580 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
8581 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
8582 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
8583 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
8584 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
8585
8586 #. type: Plain text
8587 #: build/C/man2/sync_file_range.2:65
8588 msgid "The I<flags> bit-mask argument can include any of the following values:"
8589 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
8590
8591 #. type: TP
8592 #: build/C/man2/sync_file_range.2:65
8593 #, no-wrap
8594 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8595 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
8596
8597 #. type: Plain text
8598 #: build/C/man2/sync_file_range.2:70
8599 msgid ""
8600 "Wait upon write-out of all pages in the specified range that have already "
8601 "been submitted to the device driver for write-out before performing any "
8602 "write."
8603 msgstr ""
8604 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
8605 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
8606 "つ。"
8607
8608 #. type: TP
8609 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
8610 #, no-wrap
8611 msgid "B<SYNC_FILE_RANGE_WRITE>"
8612 msgstr "B<SYNC_FILE_RANGE_WRITE>"
8613
8614 #. type: Plain text
8615 #: build/C/man2/sync_file_range.2:76
8616 msgid ""
8617 "Initiate write-out of all dirty pages in the specified range which are not "
8618 "presently submitted write-out.  Note that even this may block if you attempt "
8619 "to write more than request queue size."
8620 msgstr ""
8621 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
8622 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
8623 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
8624 "る点に注意すること。"
8625
8626 #. type: TP
8627 #: build/C/man2/sync_file_range.2:76
8628 #, no-wrap
8629 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8630 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
8631
8632 #. type: Plain text
8633 #: build/C/man2/sync_file_range.2:80
8634 msgid ""
8635 "Wait upon write-out of all pages in the range after performing any write."
8636 msgstr ""
8637 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
8638 "つ。"
8639
8640 #. type: Plain text
8641 #: build/C/man2/sync_file_range.2:84
8642 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
8643 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
8644
8645 #. type: SS
8646 #: build/C/man2/sync_file_range.2:84
8647 #, no-wrap
8648 msgid "Warning"
8649 msgstr "警告"
8650
8651 #. type: Plain text
8652 #: build/C/man2/sync_file_range.2:100
8653 msgid ""
8654 "This system call is extremely dangerous and should not be used in portable "
8655 "programs.  None of these operations writes out the file's metadata.  "
8656 "Therefore, unless the application is strictly performing overwrites of "
8657 "already-instantiated disk blocks, there are no guarantees that the data will "
8658 "be available after a crash.  There is no user interface to know if a write "
8659 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
8660 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
8661 "When writing into preallocated space, many file systems also require calls "
8662 "into the block allocator, which this system call does not sync out to disk.  "
8663 "This system call does not flush disk write caches and thus does not provide "
8664 "any data integrity on systems with volatile disk write caches."
8665 msgstr ""
8666 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
8667 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
8668 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
8669 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
8670 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
8671 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
8672 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
8673 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
8674 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
8675 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
8676 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
8677 "コールではデータの一貫性を確保できないことになる。"
8678
8679 #. type: SS
8680 #: build/C/man2/sync_file_range.2:100
8681 #, no-wrap
8682 msgid "Some details"
8683 msgstr "詳細"
8684
8685 #. type: Plain text
8686 #: build/C/man2/sync_file_range.2:108
8687 msgid ""
8688 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
8689 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
8690 msgstr ""
8691 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
8692 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
8693
8694 #. type: Plain text
8695 #: build/C/man2/sync_file_range.2:112
8696 msgid "Useful combinations of the I<flags> bits are:"
8697 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
8698
8699 #. type: TP
8700 #: build/C/man2/sync_file_range.2:112
8701 #, no-wrap
8702 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8703 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
8704
8705 #. type: Plain text
8706 #: build/C/man2/sync_file_range.2:120
8707 msgid ""
8708 "Ensures that all pages in the specified range which were dirty when "
8709 "B<sync_file_range>()  was called are placed under write-out.  This is a "
8710 "start-write-for-data-integrity operation."
8711 msgstr ""
8712 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
8713 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
8714 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
8715 "ある。"
8716
8717 #. type: Plain text
8718 #: build/C/man2/sync_file_range.2:127
8719 msgid ""
8720 "Start write-out of all dirty pages in the specified range which are not "
8721 "presently under write-out.  This is an asynchronous flush-to-disk "
8722 "operation.  This is not suitable for data integrity operations."
8723 msgstr ""
8724 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
8725 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
8726 "る。データ完全性確保が必要な操作としては適切ではない。"
8727
8728 #. type: TP
8729 #: build/C/man2/sync_file_range.2:127
8730 #, no-wrap
8731 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8732 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
8733
8734 #. type: Plain text
8735 #: build/C/man2/sync_file_range.2:134
8736 msgid ""
8737 "Wait for completion of write-out of all pages in the specified range.  This "
8738 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
8739 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
8740 "and obtain its result."
8741 msgstr ""
8742 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
8743 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
8744 "き、この操作の完了を待ち、結果を取得することができる。"
8745
8746 #. type: TP
8747 #: build/C/man2/sync_file_range.2:134
8748 #, no-wrap
8749 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8750 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
8751
8752 #. type: Plain text
8753 #: build/C/man2/sync_file_range.2:141
8754 msgid ""
8755 "This is a write-for-data-integrity operation that will ensure that all pages "
8756 "in the specified range which were dirty when B<sync_file_range>()  was "
8757 "called are committed to disk."
8758 msgstr ""
8759 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
8760 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
8761 "のページが ディスクに格納されることが保証される。"
8762
8763 #. type: Plain text
8764 #: build/C/man2/sync_file_range.2:147
8765 msgid ""
8766 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
8767 "I<errno> is set to indicate the error."
8768 msgstr ""
8769 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
8770 "I<error> にエラーを示す値を設定する。"
8771
8772 #. type: Plain text
8773 #: build/C/man2/sync_file_range.2:152
8774 msgid "I<fd> is not a valid file descriptor."
8775 msgstr "I<fd> が有効なファイルディスクリプタではない。"
8776
8777 #. type: Plain text
8778 #: build/C/man2/sync_file_range.2:160
8779 msgid ""
8780 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
8781 msgstr ""
8782 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
8783 "である。"
8784
8785 #. type: Plain text
8786 #: build/C/man2/sync_file_range.2:163
8787 msgid "I/O error."
8788 msgstr "I/O エラー。"
8789
8790 #. type: Plain text
8791 #: build/C/man2/sync_file_range.2:169
8792 msgid "Out of disk space."
8793 msgstr "ディスク領域不足である。"
8794
8795 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
8796 #.  (In userspace at least) it isn't possible to obtain a file descriptor
8797 #.  for a symbolic link.
8798 #. type: Plain text
8799 #: build/C/man2/sync_file_range.2:177
8800 msgid ""
8801 "I<fd> refers to something other than a regular file, a block device, a "
8802 "directory, or a symbolic link."
8803 msgstr ""
8804 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
8805 "以外のものを指している。"
8806
8807 #. type: Plain text
8808 #: build/C/man2/sync_file_range.2:180
8809 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
8810 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
8811
8812 #. type: Plain text
8813 #: build/C/man2/sync_file_range.2:183
8814 msgid ""
8815 "This system call is Linux-specific, and should be avoided in portable "
8816 "programs."
8817 msgstr ""
8818 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
8819 "けるべきである。"
8820
8821 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
8822 #. type: Plain text
8823 #: build/C/man2/sync_file_range.2:196
8824 msgid ""
8825 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
8826 "in a suitable pair of registers.  On such architectures, the call signature "
8827 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
8828 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
8829 "architectures define a different system call that orders the arguments "
8830 "suitably:"
8831 msgstr ""
8832
8833 #. type: Plain text
8834 #: build/C/man2/sync_file_range.2:201
8835 #, no-wrap
8836 msgid ""
8837 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8838 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8839 msgstr ""
8840 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
8841 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
8842
8843 #. type: Plain text
8844 #: build/C/man2/sync_file_range.2:206
8845 msgid ""
8846 "The behavior of this system call is otherwise exactly the same as "
8847 "B<sync_file_range>()."
8848 msgstr ""
8849
8850 #. type: Plain text
8851 #: build/C/man2/sync_file_range.2:217
8852 msgid ""
8853 "A system call with this signature first appeared on the ARM architecture in "
8854 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
8855 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
8856 "architectures where glibc support is provided, glibc transparently wraps "
8857 "B<sync_file_range2>()  under the name B<sync_file_range>()."
8858 msgstr ""
8859
8860 #. type: Plain text
8861 #: build/C/man2/sync_file_range.2:222
8862 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8863 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
8864
8865 #. type: TH
8866 #: build/C/man3/malloc_get_state.3:23
8867 #, no-wrap
8868 msgid "MALLOC_GET_STATE"
8869 msgstr "MALLOC_GET_STATE"
8870
8871 #. type: TH
8872 #: build/C/man3/malloc_get_state.3:23
8873 #, no-wrap
8874 msgid "2012-03-26"
8875 msgstr "2012-03-26"
8876
8877 #. type: Plain text
8878 #: build/C/man3/malloc_get_state.3:26
8879 msgid ""
8880 "get_malloc_state, set_malloc_state - record and restore state of malloc "
8881 "implementation"
8882 msgstr ""
8883
8884 #. type: Plain text
8885 #: build/C/man3/malloc_get_state.3:31
8886 #, no-wrap
8887 msgid "B<void* malloc_get_state(void);>\n"
8888 msgstr "B<void* malloc_get_state(void);>\n"
8889
8890 #. type: Plain text
8891 #: build/C/man3/malloc_get_state.3:33
8892 #, no-wrap
8893 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
8894 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
8895
8896 #. type: Plain text
8897 #: build/C/man3/malloc_get_state.3:51
8898 msgid ""
8899 "The B<malloc_get_state>()  function records the current state of all "
8900 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
8901 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
8902 "is recorded in a system-dependent opaque data structure dynamically "
8903 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
8904 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
8905 "this memory.)"
8906 msgstr ""
8907
8908 #. type: Plain text
8909 #: build/C/man3/malloc_get_state.3:59
8910 msgid ""
8911 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
8912 "internal bookkeeping variables to the values recorded in the opaque data "
8913 "structure pointed to by I<state>."
8914 msgstr ""
8915
8916 #. type: Plain text
8917 #: build/C/man3/malloc_get_state.3:66
8918 msgid ""
8919 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
8920 "opaque data structure.  On error (for example, memory could not be allocated "
8921 "for the data structure), B<malloc_get_state>()  returns NULL."
8922 msgstr ""
8923
8924 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
8925 #.  /* Must fail if the major version is too high. */
8926 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
8927 #. type: Plain text
8928 #: build/C/man3/malloc_get_state.3:84
8929 msgid ""
8930 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
8931 "that I<state> does not point to a correctly formed data structure, "
8932 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
8933 "version of the data structure referred to by I<state> is a more recent "
8934 "version than this implementation knows about, B<malloc_set_state>()  returns "
8935 "-2."
8936 msgstr ""
8937
8938 #. type: Plain text
8939 #: build/C/man3/malloc_get_state.3:92
8940 msgid ""
8941 "These functions are especially useful when using this B<malloc>(3)  "
8942 "implementation as part of a shared library, and the heap contents are saved/"
8943 "restored via some other method.  This technique is used by the GNU Emacs to "
8944 "implement its \"dumping\" function."
8945 msgstr ""
8946
8947 #.  i.e., calls __malloc_check_init()
8948 #.  i.e., malloc checking is not already in use
8949 #.  and the caller requested malloc checking
8950 #. type: Plain text
8951 #: build/C/man3/malloc_get_state.3:109
8952 msgid ""
8953 "Hook function pointers are never saved or restored by these functions, with "
8954 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
8955 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
8956 "checking hooks if possible; if malloc checking was not in use in the "
8957 "recorded state, but the caller has requested malloc checking, then the hooks "
8958 "are reset to 0."
8959 msgstr ""
8960
8961 #. type: Plain text
8962 #: build/C/man3/malloc_get_state.3:112
8963 msgid "B<malloc>(3), B<mallopt>(3)"
8964 msgstr "B<malloc>(3), B<mallopt>(3)"
8965
8966 #. type: TH
8967 #: build/C/man3/malloc_trim.3:24
8968 #, no-wrap
8969 msgid "MALLOC_TRIM"
8970 msgstr "MALLOC_TRIM"
8971
8972 #. type: TH
8973 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
8974 #, no-wrap
8975 msgid "2012-03-29"
8976 msgstr "2012-03-29"
8977
8978 #. type: Plain text
8979 #: build/C/man3/malloc_trim.3:27
8980 msgid "malloc_trim - release free memory from the top of the heap"
8981 msgstr ""
8982
8983 #. type: Plain text
8984 #: build/C/man3/malloc_trim.3:31
8985 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
8986 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
8987
8988 #. type: Plain text
8989 #: build/C/man3/malloc_trim.3:38
8990 msgid ""
8991 "The B<malloc_trim>()  function attempts to release free memory at the top of "
8992 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
8993 msgstr ""
8994
8995 #. type: Plain text
8996 #: build/C/man3/malloc_trim.3:49
8997 msgid ""
8998 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
8999 "the top of the heap.  If this argument is 0, only the minimum amount of "
9000 "memory is maintained at the top of the heap (i.e., one page or less).  A "
9001 "nonzero argument can be used to maintain some trailing space at the top of "
9002 "the heap in order to allow future allocations to be made without having to "
9003 "extend the heap with B<sbrk>(2)."
9004 msgstr ""
9005
9006 #. type: Plain text
9007 #: build/C/man3/malloc_trim.3:54
9008 msgid ""
9009 "The B<malloc_trim>()  function returns 1 if memory was actually released "
9010 "back to the system, or 0 if it was not possible to release any memory."
9011 msgstr ""
9012
9013 #.  .SH VERSIONS
9014 #.  Available already in glibc 2.0, possibly earlier
9015 #. type: Plain text
9016 #: build/C/man3/malloc_trim.3:58
9017 msgid "No errors are defined."
9018 msgstr ""
9019
9020 #. type: Plain text
9021 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
9022 msgid "This function is a GNU extension."
9023 msgstr "この関数は GNU による拡張である。"
9024
9025 #. type: Plain text
9026 #: build/C/man3/malloc_trim.3:69
9027 msgid ""
9028 "This function is automatically called by B<free>(3)  in certain "
9029 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
9030 "B<mallopt>(3)."
9031 msgstr ""
9032
9033 #. type: Plain text
9034 #: build/C/man3/malloc_trim.3:72
9035 msgid ""
9036 "This function cannot release free memory located at places other than the "
9037 "top of the heap."
9038 msgstr ""
9039
9040 #.  malloc/malloc.c::mTRIm():
9041 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
9042 #. type: Plain text
9043 #: build/C/man3/malloc_trim.3:76
9044 msgid "This function only releases memory in the main arena."
9045 msgstr ""
9046
9047 #. type: Plain text
9048 #: build/C/man3/malloc_trim.3:80
9049 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9050 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
9051
9052 #. type: TH
9053 #: build/C/man3/malloc_usable_size.3:23
9054 #, no-wrap
9055 msgid "MALLOC_USABLE_SIZE"
9056 msgstr "MALLOC_USABLE_SIZE"
9057
9058 #. type: Plain text
9059 #: build/C/man3/malloc_usable_size.3:26
9060 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
9061 msgstr ""
9062
9063 #. type: Plain text
9064 #: build/C/man3/malloc_usable_size.3:30
9065 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9066 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
9067
9068 #. type: Plain text
9069 #: build/C/man3/malloc_usable_size.3:38
9070 msgid ""
9071 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
9072 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
9073 "B<malloc>(3)  or a related function."
9074 msgstr ""
9075
9076 #. type: Plain text
9077 #: build/C/man3/malloc_usable_size.3:46
9078 msgid ""
9079 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
9080 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
9081 msgstr ""
9082
9083 #. type: Plain text
9084 #: build/C/man3/malloc_usable_size.3:58
9085 msgid ""
9086 "The value returned by B<malloc_usable_size>()  may be greater than the "
9087 "requested size of the allocation because of alignment and minimum size "
9088 "constraints.  Although the excess bytes can be overwritten by the "
9089 "application without ill effects, this is not good programming practice: the "
9090 "number of excess bytes in an allocation depends on the underlying "
9091 "implementation."
9092 msgstr ""
9093
9094 #. type: Plain text
9095 #: build/C/man3/malloc_usable_size.3:60
9096 msgid "The main use of this function is for debugging and introspection."
9097 msgstr ""
9098
9099 #. type: Plain text
9100 #: build/C/man3/malloc_usable_size.3:62
9101 msgid "B<malloc>(3)"
9102 msgstr "B<malloc>(3)"
9103
9104 #. type: TH
9105 #: build/C/man3/mcheck.3:23
9106 #, no-wrap
9107 msgid "MCHECK"
9108 msgstr ""
9109
9110 #. type: Plain text
9111 #: build/C/man3/mcheck.3:26
9112 msgid ""
9113 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
9114 msgstr ""
9115
9116 #. type: Plain text
9117 #: build/C/man3/mcheck.3:29
9118 #, no-wrap
9119 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
9120 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
9121
9122 #. type: Plain text
9123 #: build/C/man3/mcheck.3:31
9124 #, no-wrap
9125 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
9126 msgstr ""
9127
9128 #. type: Plain text
9129 #: build/C/man3/mcheck.3:33
9130 #, no-wrap
9131 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
9132 msgstr ""
9133
9134 #. type: Plain text
9135 #: build/C/man3/mcheck.3:35
9136 #, no-wrap
9137 msgid "B<void mcheck_check_all(void);>\n"
9138 msgstr "B<void mcheck_check_all(void);>\n"
9139
9140 #. type: Plain text
9141 #: build/C/man3/mcheck.3:37
9142 #, no-wrap
9143 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
9144 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
9145
9146 #. type: Plain text
9147 #: build/C/man3/mcheck.3:50
9148 msgid ""
9149 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
9150 "(3)  family of memory-allocation functions.  These hooks cause certain "
9151 "consistency checks to be performed on the state of the heap.  The checks can "
9152 "detect application errors such as freeing a block of memory more than once "
9153 "or corrupting the bookkeeping data structures that immediately precede a "
9154 "block of allocated memory."
9155 msgstr ""
9156
9157 #. type: Plain text
9158 #: build/C/man3/mcheck.3:62
9159 msgid ""
9160 "To be effective, the B<mcheck>()  function must be called before the first "
9161 "call to B<malloc>(3)  or a related function.  In cases where this is "
9162 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
9163 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
9164 "memory-allocation function."
9165 msgstr ""
9166
9167 #. type: Plain text
9168 #: build/C/man3/mcheck.3:70
9169 msgid ""
9170 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
9171 "checks on all allocated blocks whenever one of the memory-allocation "
9172 "functions is called.  This can be very slow!"
9173 msgstr ""
9174
9175 #. type: Plain text
9176 #: build/C/man3/mcheck.3:77
9177 msgid ""
9178 "The B<mcheck_check_all>()  function causes an immediate check on all "
9179 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
9180 "beforehand."
9181 msgstr ""
9182
9183 #. type: Plain text
9184 #: build/C/man3/mcheck.3:90
9185 msgid ""
9186 "If the system detects an inconsistency in the heap, the caller-supplied "
9187 "function pointed to by I<abortfunc> is invoked with a single argument "
9188 "argument, I<mstatus>, that indicates what type of inconsistency was "
9189 "detected.  If I<abortfunc> is NULL, a default function prints an error "
9190 "message on I<stderr> and calls B<abort>(3)."
9191 msgstr ""
9192
9193 #. type: Plain text
9194 #: build/C/man3/mcheck.3:102
9195 msgid ""
9196 "The B<mprobe>()  function performs a consistency check on the block of "
9197 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
9198 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
9199 msgstr ""
9200
9201 #. type: Plain text
9202 #: build/C/man3/mcheck.3:110
9203 msgid ""
9204 "The following list describes the values returned by B<mprobe>()  or passed "
9205 "as the I<mstatus> argument when I<abortfunc> is invoked:"
9206 msgstr ""
9207
9208 #. type: TP
9209 #: build/C/man3/mcheck.3:110
9210 #, no-wrap
9211 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
9212 msgstr ""
9213
9214 #. type: Plain text
9215 #: build/C/man3/mcheck.3:115
9216 msgid ""
9217 "B<mcheck>()  was not called before the first memory allocation function was "
9218 "called.  Consistency checking is not possible."
9219 msgstr ""
9220
9221 #. type: TP
9222 #: build/C/man3/mcheck.3:115
9223 #, no-wrap
9224 msgid "B<MCHECK_OK> (B<mprobe>() only)"
9225 msgstr ""
9226
9227 #. type: Plain text
9228 #: build/C/man3/mcheck.3:118
9229 msgid "No inconsistency detected."
9230 msgstr ""
9231
9232 #. type: TP
9233 #: build/C/man3/mcheck.3:118
9234 #, no-wrap
9235 msgid "B<MCHECK_HEAD>"
9236 msgstr "B<MCHECK_HEAD>"
9237
9238 #. type: Plain text
9239 #: build/C/man3/mcheck.3:121
9240 #, fuzzy
9241 #| msgid "No memory could be allocated for segment overhead."
9242 msgid "Memory preceding an allocated block was clobbered."
9243 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9244
9245 #. type: TP
9246 #: build/C/man3/mcheck.3:121
9247 #, no-wrap
9248 msgid "B<MCHECK_TAIL>"
9249 msgstr "B<MCHECK_TAIL>"
9250
9251 #. type: Plain text
9252 #: build/C/man3/mcheck.3:124
9253 #, fuzzy
9254 #| msgid "No memory could be allocated for segment overhead."
9255 msgid "Memory following an allocated block was clobbered."
9256 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
9257
9258 #. type: TP
9259 #: build/C/man3/mcheck.3:124
9260 #, no-wrap
9261 msgid "B<MCHECK_FREE>"
9262 msgstr "B<MCHECK_FREE>"
9263
9264 #. type: Plain text
9265 #: build/C/man3/mcheck.3:128
9266 msgid "A block of memory was freed twice."
9267 msgstr ""
9268
9269 #. type: Plain text
9270 #: build/C/man3/mcheck.3:133
9271 msgid ""
9272 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
9273 msgstr ""
9274
9275 #. type: Plain text
9276 #: build/C/man3/mcheck.3:144
9277 msgid ""
9278 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
9279 "since glibc 2.2.  The B<mcheck()> and B<mprobe()> functions are present "
9280 "since at least glibc 2.0"
9281 msgstr ""
9282
9283 #.  But is MALLOC_CHECK_ slower?
9284 #. type: Plain text
9285 #: build/C/man3/mcheck.3:158
9286 msgid ""
9287 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
9288 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
9289 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
9290 "application to be relinked."
9291 msgstr ""
9292
9293 #. type: Plain text
9294 #: build/C/man3/mcheck.3:165
9295 msgid ""
9296 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
9297 "same block of memory twice.  The following shell session demonstrates what "
9298 "happens when running the program:"
9299 msgstr ""
9300
9301 #. type: Plain text
9302 #: build/C/man3/mcheck.3:170
9303 #, no-wrap
9304 msgid ""
9305 "$B< ./a.out>\n"
9306 "About to free\n"
9307 msgstr ""
9308
9309 #. type: Plain text
9310 #: build/C/man3/mcheck.3:174
9311 #, no-wrap
9312 msgid ""
9313 "About to free a second time\n"
9314 "block freed twice\n"
9315 "Aborted (core dumped)\n"
9316 msgstr ""
9317
9318 #. type: Plain text
9319 #: build/C/man3/mcheck.3:182
9320 #, no-wrap
9321 msgid ""
9322 "#include E<lt>stdlib.hE<gt>\n"
9323 "#include E<lt>stdio.hE<gt>\n"
9324 "#include E<lt>mcheck.hE<gt>\n"
9325 msgstr ""
9326 "#include E<lt>stdlib.hE<gt>\n"
9327 "#include E<lt>stdio.hE<gt>\n"
9328 "#include E<lt>mcheck.hE<gt>\n"
9329
9330 #. type: Plain text
9331 #: build/C/man3/mcheck.3:190
9332 #, no-wrap
9333 msgid ""
9334 "    if (mcheck(NULL) != 0) {\n"
9335 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
9336 msgstr ""
9337
9338 #. type: Plain text
9339 #: build/C/man3/mcheck.3:193
9340 #, no-wrap
9341 msgid ""
9342 "        exit(EXIT_FAILURE);\n"
9343 "    }\n"
9344 msgstr ""
9345 "        exit(EXIT_FAILURE);\n"
9346 "    }\n"
9347
9348 #. type: Plain text
9349 #: build/C/man3/mcheck.3:195
9350 #, no-wrap
9351 msgid "    p = malloc(1000);\n"
9352 msgstr "    p = malloc(1000);\n"
9353
9354 #. type: Plain text
9355 #: build/C/man3/mcheck.3:200
9356 #, no-wrap
9357 msgid ""
9358 "    fprintf(stderr, \"About to free\\en\");\n"
9359 "    free(p);\n"
9360 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
9361 "    free(p);\n"
9362 msgstr ""
9363
9364 #.  FIXME add SEE ALSO pointer from malloc(3) to here
9365 #.  FIXME add SEE ALSO pointer from mallopt(3) to here
9366 #.  FIXME add SEE ALSO pointer from mtrace(3) to here
9367 #. type: Plain text
9368 #: build/C/man3/mcheck.3:211
9369 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
9370 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
9371
9372 #~ msgid "2012-02-27"
9373 #~ msgstr "2012-02-27"
9374
9375 #~ msgid ""
9376 #~ "The I<mode> is not supported by the file system containing the file "
9377 #~ "referred to by I<fd>."
9378 #~ msgstr ""
9379 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
9380 #~ "ない。"
9381
9382 #~ msgid "2012-03-22"
9383 #~ msgstr "2012-03-22"
9384
9385 #~ msgid ""
9386 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
9387 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
9388 #~ msgstr ""
9389 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
9390 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
9391
9392 #~ msgid ""
9393 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
9394 #~ "()  writes its output.  This file must be writable to the user or "
9395 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
9396 #~ "truncated."
9397 #~ msgstr ""
9398 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
9399 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
9400 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
9401 #~ "イルの元の内容を上書きする。"
9402
9403 #~ msgid "These are GNU extensions."
9404 #~ msgstr "この関数は GNU 拡張である。"
9405
9406 #~ msgid ""
9407 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
9408 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
9409 #~ msgstr ""
9410 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
9411 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
9412 #~ "リプトが付属している。"
9413
9414 #~ msgid ""
9415 #~ "This flag allocates and initializes to zero the disk space within the "
9416 #~ "range specified by I<offset> and I<len>.  After a successful call, "
9417 #~ "subsequent writes into this range are guaranteed not to fail because of "
9418 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
9419 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
9420 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
9421 #~ "less than I<offset>+I<len>."
9422 #~ msgstr ""
9423 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
9424 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
9425 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
9426 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
9427 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
9428 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
9429 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
9430 #~ "は変更されることはない。"
9431
9432 #, fuzzy
9433 #~| msgid "The buffer referred to by I<map> is not accessible."
9434 #~ msgid ""
9435 #~ "The file referred to by I<fd> is marked immutable (see B<chattr>(1))."
9436 #~ msgstr "The buffer referred to by I<map> is not accessible."
9437
9438 #~ msgid ""
9439 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
9440 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
9441 #~ msgstr ""
9442 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
9443 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
9444
9445 #~ msgid ""
9446 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
9447 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
9448 #~ "required."
9449 #~ msgstr ""
9450 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
9451 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
9452 #~ "が必要である。"
9453
9454 #~ msgid ""
9455 #~ "B<#define _XOPEN_SOURCE 600>\n"
9456 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9457 #~ msgstr ""
9458 #~ "B<#define _XOPEN_SOURCE 600>\n"
9459 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9460
9461 #~ msgid ""
9462 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
9463 #~ "provided since version 2.2."
9464 #~ msgstr ""
9465 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
9466 #~ "glibc バージョン 2.2 以降で行われている。"
9467
9468 #~ msgid ""
9469 #~ "B<#define _GNU_SOURCE>\n"
9470 #~ "B<#include E<lt>fcntl.hE<gt>>\n"
9471 #~ msgstr ""
9472 #~ "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
9473 #~ "B<#include E<lt>fcntl.hE<gt>>\n"