OSDN Git Service

(split) LDP: Regenerate POT and ja.po with updated perkamon.
[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-10 20:03+0900\n"
10 "PO-Revision-Date: 2012-05-08 01:33+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/alloc_hugepages.2:25
20 #, no-wrap
21 msgid "ALLOC_HUGEPAGES"
22 msgstr "ALLOC_HUGEPAGES"
23
24 #. type: TH
25 #: build/C/man2/alloc_hugepages.2:25
26 #, no-wrap
27 msgid "2007-05-31"
28 msgstr "2007-05-31"
29
30 #. type: TH
31 #: build/C/man2/alloc_hugepages.2:25 build/C/man2/cacheflush.2:24
32 #: build/C/man2/fallocate.2:8 build/C/man2/madvise.2:35
33 #: build/C/man3/malloc_trim.3:24 build/C/man3/mallopt.3:24
34 #: build/C/man2/mlock.2:27 build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
35 #: build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31 build/C/man2/msync.2:25
36 #: build/C/man2/posix_fadvise.2:27 build/C/man2/readahead.2:28
37 #: build/C/man2/remap_file_pages.2:26 build/C/man3/shm_open.3:26
38 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:43
39 #: build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
40 #: build/C/man2/subpage_prot.2:28 build/C/man2/sync_file_range.2:30
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_get_state.3:23
49 #: build/C/man3/malloc_hook.3:6 build/C/man3/malloc_trim.3:24
50 #: build/C/man3/malloc_usable_size.3:23 build/C/man3/mallopt.3:24
51 #: build/C/man3/mcheck.3:23 build/C/man2/mlock.2:27 build/C/man2/mmap.2:40
52 #: build/C/man2/mmap2.2:29 build/C/man2/mprotect.2:32 build/C/man2/mremap.2:31
53 #: build/C/man2/msync.2:25 build/C/man3/mtrace.3:23
54 #: build/C/man2/posix_fadvise.2:27 build/C/man3/posix_fallocate.3:23
55 #: build/C/man3/posix_memalign.3:28 build/C/man2/readahead.2:28
56 #: build/C/man2/remap_file_pages.2:26 build/C/man3/shm_open.3:26
57 #: build/C/man7/shm_overview.7:27 build/C/man2/shmctl.2:43
58 #: build/C/man2/shmget.2:36 build/C/man2/shmop.2:39
59 #: build/C/man2/subpage_prot.2:28 build/C/man2/sync_file_range.2:30
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_get_state.3:24
68 #: build/C/man3/malloc_hook.3:7 build/C/man3/malloc_trim.3:25
69 #: build/C/man3/malloc_usable_size.3:24 build/C/man3/mallopt.3:25
70 #: build/C/man3/mcheck.3:24 build/C/man2/mlock.2:28 build/C/man2/mmap.2:41
71 #: build/C/man2/mmap2.2:30 build/C/man2/mprotect.2:33 build/C/man2/mremap.2:32
72 #: build/C/man2/msync.2:26 build/C/man3/mtrace.3:24
73 #: build/C/man2/posix_fadvise.2:28 build/C/man3/posix_fallocate.3:24
74 #: build/C/man3/posix_memalign.3:29 build/C/man2/readahead.2:29
75 #: build/C/man2/remap_file_pages.2:27 build/C/man3/shm_open.3:27
76 #: build/C/man7/shm_overview.7:28 build/C/man2/shmctl.2:44
77 #: build/C/man2/shmget.2:37 build/C/man2/shmop.2:40
78 #: build/C/man2/subpage_prot.2:29 build/C/man2/sync_file_range.2:31
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_get_state.3:26
93 #: build/C/man3/malloc_hook.3:11 build/C/man3/malloc_trim.3:27
94 #: build/C/man3/malloc_usable_size.3:26 build/C/man3/mallopt.3:27
95 #: build/C/man3/mcheck.3:26 build/C/man2/mlock.2:30 build/C/man2/mmap.2:43
96 #: build/C/man2/mmap2.2:32 build/C/man2/mprotect.2:35 build/C/man2/mremap.2:34
97 #: build/C/man2/msync.2:28 build/C/man3/mtrace.3:26
98 #: build/C/man2/posix_fadvise.2:30 build/C/man3/posix_fallocate.3:26
99 #: build/C/man3/posix_memalign.3:31 build/C/man2/readahead.2:31
100 #: build/C/man2/remap_file_pages.2:29 build/C/man3/shm_open.3:29
101 #: build/C/man2/shmctl.2:46 build/C/man2/shmget.2:39 build/C/man2/shmop.2:42
102 #: build/C/man2/subpage_prot.2:31 build/C/man2/sync_file_range.2:33
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_get_state.3:34
130 #: build/C/man3/malloc_hook.3:29 build/C/man3/malloc_trim.3:31
131 #: build/C/man3/malloc_usable_size.3:30 build/C/man3/mallopt.3:31
132 #: build/C/man3/mcheck.3:39 build/C/man2/mlock.2:40 build/C/man2/mmap.2:52
133 #: build/C/man2/mmap2.2:39 build/C/man2/mprotect.2:41 build/C/man2/mremap.2:43
134 #: build/C/man2/msync.2:32 build/C/man3/mtrace.3:32
135 #: build/C/man2/posix_fadvise.2:49 build/C/man3/posix_fallocate.3:44
136 #: build/C/man3/posix_memalign.3:83 build/C/man2/readahead.2:38
137 #: build/C/man2/remap_file_pages.2:37 build/C/man3/shm_open.3:41
138 #: build/C/man7/shm_overview.7:30 build/C/man2/shmctl.2:54
139 #: build/C/man2/shmget.2:47 build/C/man2/shmop.2:51
140 #: build/C/man2/subpage_prot.2:36 build/C/man2/sync_file_range.2:41
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/malloc_get_state.3:59
236 #: build/C/man3/malloc_trim.3:49 build/C/man3/malloc_usable_size.3:38
237 #: build/C/man3/mallopt.3:377 build/C/man3/mcheck.3:128
238 #: build/C/man2/mlock.2:117 build/C/man2/mmap.2:373 build/C/man2/mmap2.2:54
239 #: build/C/man2/mprotect.2:72 build/C/man2/mremap.2:128
240 #: build/C/man2/msync.2:68 build/C/man2/posix_fadvise.2:86
241 #: build/C/man3/posix_fallocate.3:64 build/C/man3/posix_memalign.3:141
242 #: build/C/man2/readahead.2:65 build/C/man2/remap_file_pages.2:122
243 #: build/C/man3/shm_open.3:169 build/C/man2/shmctl.2:272
244 #: build/C/man2/shmget.2:178 build/C/man2/shmop.2:169
245 #: build/C/man2/subpage_prot.2:61 build/C/man2/sync_file_range.2:141
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/malloc_trim.3:54 build/C/man3/mallopt.3:382
265 #: build/C/man2/mlock.2:123 build/C/man2/mmap.2:390 build/C/man2/mmap2.2:61
266 #: build/C/man2/mprotect.2:79 build/C/man2/mremap.2:136
267 #: build/C/man2/msync.2:73 build/C/man2/posix_fadvise.2:89
268 #: build/C/man3/posix_fallocate.3:70 build/C/man3/posix_memalign.3:155
269 #: build/C/man2/readahead.2:71 build/C/man2/remap_file_pages.2:129
270 #: build/C/man3/shm_open.3:178 build/C/man2/shmctl.2:294
271 #: build/C/man2/shmget.2:182 build/C/man2/shmop.2:183
272 #: build/C/man2/subpage_prot.2:66 build/C/man2/sync_file_range.2:147
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_get_state.3:84
318 #: build/C/man3/malloc_hook.3:76 build/C/man3/malloc_trim.3:58
319 #: build/C/man3/malloc_usable_size.3:46 build/C/man3/mallopt.3:390
320 #: build/C/man3/mcheck.3:144 build/C/man2/mlock.2:187 build/C/man2/mmap.2:483
321 #: build/C/man2/mmap2.2:77 build/C/man2/mprotect.2:107
322 #: build/C/man2/mremap.2:186 build/C/man2/msync.2:96 build/C/man3/mtrace.3:76
323 #: build/C/man2/posix_fadvise.2:111 build/C/man3/posix_fallocate.3:101
324 #: build/C/man3/posix_memalign.3:180 build/C/man2/readahead.2:87
325 #: build/C/man2/remap_file_pages.2:151 build/C/man3/shm_open.3:249
326 #: build/C/man7/shm_overview.7:101 build/C/man2/shmctl.2:366
327 #: build/C/man2/shmget.2:229 build/C/man2/shmop.2:226
328 #: build/C/man2/subpage_prot.2:91 build/C/man2/sync_file_range.2:180
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_get_state.3:86
345 #: build/C/man3/malloc_hook.3:78 build/C/man3/malloc_trim.3:60
346 #: build/C/man3/malloc_trim.3:72 build/C/man3/malloc_usable_size.3:48
347 #: build/C/man3/mcheck.3:146 build/C/man2/mlock.2:214 build/C/man2/mmap.2:501
348 #: build/C/man2/mmap2.2:79 build/C/man2/mprotect.2:116
349 #: build/C/man2/mremap.2:192 build/C/man3/mtrace.3:78
350 #: build/C/man2/posix_fadvise.2:120 build/C/man3/posix_memalign.3:219
351 #: build/C/man3/shm_open.3:255 build/C/man7/shm_overview.7:103
352 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:235
353 #: build/C/man2/shmop.2:245 build/C/man2/subpage_prot.2:93
354 #: build/C/man2/sync_file_range.2:183
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_get_state.3:112
384 #: build/C/man3/malloc_hook.3:138 build/C/man3/malloc_trim.3:80
385 #: build/C/man3/malloc_usable_size.3:62 build/C/man3/mallopt.3:580
386 #: build/C/man3/mcheck.3:211 build/C/man2/mlock.2:337 build/C/man2/mmap.2:671
387 #: build/C/man2/mmap2.2:98 build/C/man2/mprotect.2:223
388 #: build/C/man2/mremap.2:214 build/C/man2/msync.2:122
389 #: build/C/man3/mtrace.3:170 build/C/man2/posix_fadvise.2:188
390 #: build/C/man3/posix_fallocate.3:130 build/C/man3/posix_memalign.3:275
391 #: build/C/man2/readahead.2:98 build/C/man2/remap_file_pages.2:162
392 #: build/C/man3/shm_open.3:280 build/C/man7/shm_overview.7:127
393 #: build/C/man2/shmctl.2:410 build/C/man2/shmget.2:298
394 #: build/C/man2/shmop.2:290 build/C/man2/subpage_prot.2:126
395 #: build/C/man2/sync_file_range.2:222
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_get_state.3:119
404 #: build/C/man3/malloc_hook.3:145 build/C/man3/malloc_trim.3:87
405 #: build/C/man3/malloc_usable_size.3:69 build/C/man3/mallopt.3:587
406 #: build/C/man3/mcheck.3:218 build/C/man2/mlock.2:344 build/C/man2/mmap.2:678
407 #: build/C/man2/mmap2.2:105 build/C/man2/mprotect.2:230
408 #: build/C/man2/mremap.2:221 build/C/man2/msync.2:129
409 #: build/C/man3/mtrace.3:177 build/C/man2/posix_fadvise.2:195
410 #: build/C/man3/posix_fallocate.3:137 build/C/man3/posix_memalign.3:282
411 #: build/C/man2/readahead.2:105 build/C/man2/remap_file_pages.2:169
412 #: build/C/man3/shm_open.3:287 build/C/man7/shm_overview.7:134
413 #: build/C/man2/shmctl.2:417 build/C/man2/shmget.2:305
414 #: build/C/man2/shmop.2:297 build/C/man2/subpage_prot.2:133
415 #: build/C/man2/sync_file_range.2:229
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_get_state.3:23
439 #: build/C/man3/malloc_hook.3:6 build/C/man3/malloc_usable_size.3:23
440 #: build/C/man3/mcheck.3:23 build/C/man3/mtrace.3:23
441 #: build/C/man3/posix_fallocate.3:23 build/C/man3/posix_memalign.3:28
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_get_state.3:109
620 #: build/C/man3/malloc_hook.3:133 build/C/man3/malloc_trim.3:76
621 #: build/C/man3/malloc_usable_size.3:60 build/C/man3/mallopt.3:568
622 #: build/C/man3/mcheck.3:204 build/C/man2/mlock.2:330 build/C/man2/mmap.2:653
623 #: build/C/man2/mmap2.2:92 build/C/man2/mprotect.2:220
624 #: build/C/man2/mremap.2:200 build/C/man2/msync.2:118
625 #: build/C/man3/mtrace.3:165 build/C/man2/posix_fadvise.2:182
626 #: build/C/man3/posix_fallocate.3:126 build/C/man3/posix_memalign.3:270
627 #: build/C/man2/readahead.2:92 build/C/man2/remap_file_pages.2:155
628 #: build/C/man3/shm_open.3:269 build/C/man7/shm_overview.7:114
629 #: build/C/man2/shmctl.2:403 build/C/man2/shmget.2:290
630 #: build/C/man2/shmop.2:282 build/C/man2/subpage_prot.2:120
631 #: build/C/man2/sync_file_range.2:217
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 "呼び出しが成功した場合、\n"
884 "I<offset> と I<len> で指定された範囲へのそれ以降の書き込みでは、\n"
885 "ディスクの領域不足での書き込み失敗が起こらないことが保証される。"
886
887 #. type: Plain text
888 #: build/C/man2/fallocate.2:75
889 msgid ""
890 "If the B<FALLOC_FL_KEEP_SIZE> flag is specified in I<mode>, the behavior of "
891 "the call is similar, but the file size will not be changed even if I<offset>"
892 "+I<len> is greater than the file size.  Preallocating zeroed blocks beyond "
893 "the end of the file in this manner is useful for optimizing append workloads."
894 msgstr ""
895 "B<FALLOC_FL_KEEP_SIZE> フラグが I<mode> に指定された場合、このシステムコー"
896 "ル\n"
897 "の動作は似ているが、 I<offset>+I<len> がファイルサイズよりも大きい場合で\n"
898 "あってもファイルサイズは変更されない点が異なる。この場合のファイルの末尾\n"
899 "よりも後ろの前もって割り当てられた 0 で埋められたブロックは、ファイルへの\n"
900 "追記を最適化したい場合に役に立つ。"
901
902 #. type: Plain text
903 #: build/C/man2/fallocate.2:79
904 msgid ""
905 "Because allocation is done in block size chunks, B<fallocate>()  may "
906 "allocate a larger range of disk space than was specified."
907 msgstr ""
908 "割り当てはブロックサイズ単位で行われるため、 B<fallocate>() は指定されたよ"
909 "り\n"
910 "も大きなディスク領域を割り当てることがある。"
911
912 #. type: SS
913 #: build/C/man2/fallocate.2:79
914 #, no-wrap
915 msgid "Deallocating file space"
916 msgstr "ファイル空間の割り当て解除"
917
918 #. type: Plain text
919 #: build/C/man2/fallocate.2:94
920 msgid ""
921 "Specifying the B<FALLOC_FL_PUNCH_HOLE> flag (available since Linux 2.6.38) "
922 "in I<mode> deallocates space (i.e., creates a hole)  in the byte range "
923 "starting at I<offset> and continuing for I<len> bytes.  Within the specified "
924 "range, partial file system blocks are zeroed, and whole file system blocks "
925 "are removed from the file.  After a successful call, subsequent reads from "
926 "this range will return zeroes."
927 msgstr ""
928
929 #. type: Plain text
930 #: build/C/man2/fallocate.2:105
931 msgid ""
932 "The B<FALLOC_FL_PUNCH_HOLE> flag must be ORed with B<FALLOC_FL_KEEP_SIZE> in "
933 "I<mode>; in other words, even when punching off the end of the file, the "
934 "file size (as reported by B<stat>(2))  does not change."
935 msgstr ""
936
937 #. type: Plain text
938 #: build/C/man2/fallocate.2:109
939 msgid ""
940 "Not all file systems support B<FALLOC_FL_PUNCH_HOLE>; if a file system "
941 "doesn't support the operation, an error is returned."
942 msgstr ""
943
944 #. type: Plain text
945 #: build/C/man2/fallocate.2:112
946 msgid "B<fallocate>()  returns zero on success, and -1 on failure."
947 msgstr "B<fallocate>()  は成功すると 0 を返し、エラーの場合は -1 を返す。"
948
949 #. type: TP
950 #: build/C/man2/fallocate.2:113 build/C/man2/madvise.2:261
951 #: build/C/man2/mmap.2:415 build/C/man2/posix_fadvise.2:90
952 #: build/C/man3/posix_fallocate.3:71 build/C/man2/readahead.2:72
953 #: build/C/man2/sync_file_range.2:148
954 #, no-wrap
955 msgid "B<EBADF>"
956 msgstr "B<EBADF>"
957
958 #. type: Plain text
959 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
960 msgid "I<fd> is not a valid file descriptor, or is not opened for writing."
961 msgstr ""
962 "I<fd> が有効なファイルディスクリプタでないか、 書き込み用としてオープンされて"
963 "いない。"
964
965 #. type: TP
966 #: build/C/man2/fallocate.2:117 build/C/man3/posix_fallocate.3:75
967 #, no-wrap
968 msgid "B<EFBIG>"
969 msgstr "B<EFBIG>"
970
971 #. type: Plain text
972 #: build/C/man2/fallocate.2:121
973 msgid "I<offset>+I<len> exceeds the maximum file size."
974 msgstr "I<offset + len> がファイルサイズの最大値よりも大きい。"
975
976 #. type: TP
977 #: build/C/man2/fallocate.2:121
978 #, no-wrap
979 msgid "B<EINTR>"
980 msgstr "B<EINTR>"
981
982 #. type: Plain text
983 #: build/C/man2/fallocate.2:124
984 msgid "A signal was caught during execution."
985 msgstr "実行中にシグナルが捕捉された。"
986
987 #. type: Plain text
988 #: build/C/man2/fallocate.2:136 build/C/man3/posix_fallocate.3:85
989 msgid "I<offset> was less than 0, or I<len> was less than or equal to 0."
990 msgstr "I<offset> が 0 未満だったか、 I<len> が 0 以下だった。"
991
992 #. type: TP
993 #: build/C/man2/fallocate.2:136 build/C/man2/madvise.2:292
994 #: build/C/man2/sync_file_range.2:160
995 #, no-wrap
996 msgid "B<EIO>"
997 msgstr "B<EIO>"
998
999 #. type: Plain text
1000 #: build/C/man2/fallocate.2:139
1001 msgid "An I/O error occurred while reading from or writing to a file system."
1002 msgstr "ファイルシステムとの読み書き中に入出力エラーが発生した。"
1003
1004 #. type: TP
1005 #: build/C/man2/fallocate.2:139 build/C/man2/mmap.2:450
1006 #: build/C/man3/posix_fallocate.3:85
1007 #, no-wrap
1008 msgid "B<ENODEV>"
1009 msgstr "B<ENODEV>"
1010
1011 #. type: Plain text
1012 #: build/C/man2/fallocate.2:146
1013 msgid ""
1014 "I<fd> does not refer to a regular file or a directory.  (If I<fd> is a pipe "
1015 "or FIFO, a different error results.)"
1016 msgstr ""
1017 "I<fd> が通常のファイルかディレクトリを参照していない (I<fd> がパイプや FIFO "
1018 "を参照している場合、別のエラーが発生する)。"
1019
1020 #. type: TP
1021 #: build/C/man2/fallocate.2:146 build/C/man3/posix_fallocate.3:89
1022 #: build/C/man2/shmget.2:214 build/C/man2/sync_file_range.2:166
1023 #, no-wrap
1024 msgid "B<ENOSPC>"
1025 msgstr "B<ENOSPC>"
1026
1027 #. type: Plain text
1028 #: build/C/man2/fallocate.2:151 build/C/man3/posix_fallocate.3:94
1029 msgid ""
1030 "There is not enough space left on the device containing the file referred to "
1031 "by I<fd>."
1032 msgstr "I<fd> が参照するファイルを含むデバイスに十分な空き領域がない。"
1033
1034 #. type: Plain text
1035 #: build/C/man2/fallocate.2:155
1036 msgid "This kernel does not implement B<fallocate>()."
1037 msgstr "このカーネルでは B<fallocate>() は実装されていない。"
1038
1039 #. type: TP
1040 #: build/C/man2/fallocate.2:155
1041 #, no-wrap
1042 msgid "B<EOPNOTSUPP>"
1043 msgstr "B<EOPNOTSUPP>"
1044
1045 #. type: Plain text
1046 #: build/C/man2/fallocate.2:164
1047 msgid ""
1048 "The file system containing the file referred to by I<fd> does not support "
1049 "this operation; or the I<mode> is not supported by the file system "
1050 "containing the file referred to by I<fd>."
1051 msgstr ""
1052 "I<fd> が参照するファイルを含むファイルシステムが 指定された操作を\n"
1053 "サポートしていない。 I<fd> が参照するファイルを含むファイルシステムが\n"
1054 "I<mode> をサポートしていない。"
1055
1056 #. type: TP
1057 #: build/C/man2/fallocate.2:164 build/C/man2/mlock.2:144
1058 #: build/C/man2/mlock.2:183 build/C/man2/mmap.2:458 build/C/man2/shmctl.2:342
1059 #: build/C/man2/shmget.2:222
1060 #, no-wrap
1061 msgid "B<EPERM>"
1062 msgstr "B<EPERM>"
1063
1064 #. type: Plain text
1065 #: build/C/man2/fallocate.2:180
1066 msgid ""
1067 "The file referred to by I<fd> is marked immutable (see B<chattr>(1)).  Or: "
1068 "I<mode> specifies B<FALLOC_FL_PUNCH_HOLE> and the file referred to by I<fd> "
1069 "is marked append-only (see B<chattr>(1))."
1070 msgstr ""
1071
1072 #. type: TP
1073 #: build/C/man2/fallocate.2:180 build/C/man2/posix_fadvise.2:96
1074 #: build/C/man3/posix_fallocate.3:94 build/C/man2/sync_file_range.2:169
1075 #, no-wrap
1076 msgid "B<ESPIPE>"
1077 msgstr "B<ESPIPE>"
1078
1079 #. type: Plain text
1080 #: build/C/man2/fallocate.2:184
1081 msgid "I<fd> refers to a pipe or FIFO."
1082 msgstr "I<fd> がパイプか FIFO を参照している。"
1083
1084 #. type: SH
1085 #: build/C/man2/fallocate.2:184 build/C/man3/mcheck.3:133
1086 #: build/C/man2/mmap2.2:74 build/C/man2/posix_fadvise.2:103
1087 #: build/C/man3/posix_fallocate.3:98 build/C/man3/posix_memalign.3:165
1088 #: build/C/man2/readahead.2:82 build/C/man2/remap_file_pages.2:146
1089 #: build/C/man3/shm_open.3:247 build/C/man2/subpage_prot.2:85
1090 #: build/C/man2/sync_file_range.2:177
1091 #, no-wrap
1092 msgid "VERSIONS"
1093 msgstr "バージョン"
1094
1095 #. type: Plain text
1096 #: build/C/man2/fallocate.2:188
1097 msgid ""
1098 "B<fallocate>()  is available on Linux since kernel 2.6.23.  Support is "
1099 "provided by glibc since version 2.10."
1100 msgstr ""
1101 "B<fallocate>()  はカーネル 2.6.23 以降の Linux で利用可能である。 glibc での"
1102 "対応はバージョン 3.10 以降で行われている。"
1103
1104 #. type: Plain text
1105 #: build/C/man2/fallocate.2:191
1106 msgid "B<fallocate>()  is Linux-specific."
1107 msgstr "B<fallocate>()  は Linux 固有である。"
1108
1109 #. type: Plain text
1110 #: build/C/man2/fallocate.2:195
1111 msgid "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1112 msgstr "B<ftruncate>(2), B<posix_fadvise>(3), B<posix_fallocate>(3)"
1113
1114 #. type: TH
1115 #: build/C/man2/madvise.2:35
1116 #, no-wrap
1117 msgid "MADVISE"
1118 msgstr "MADVISE"
1119
1120 #. type: TH
1121 #: build/C/man2/madvise.2:35
1122 #, no-wrap
1123 msgid "2011-09-18"
1124 msgstr "2011-09-18"
1125
1126 #. type: Plain text
1127 #: build/C/man2/madvise.2:38
1128 msgid "madvise - give advice about use of memory"
1129 msgstr "madvise - メモリ利用に関するアドバイスを与える"
1130
1131 #. type: Plain text
1132 #: build/C/man2/madvise.2:40 build/C/man2/msync.2:30
1133 #: build/C/man3/shm_open.3:31
1134 msgid "B<#include E<lt>sys/mman.hE<gt>>"
1135 msgstr "B<#include E<lt>sys/mman.hE<gt>>"
1136
1137 #. type: Plain text
1138 #: build/C/man2/madvise.2:42
1139 msgid ""
1140 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1141 msgstr ""
1142 "B<int madvise(void *>I<addr>B<, size_t >I<length>B<, int >I<advice>B<);>"
1143
1144 #. type: Plain text
1145 #: build/C/man2/madvise.2:46 build/C/man2/posix_fadvise.2:42
1146 #: build/C/man3/posix_fallocate.3:37 build/C/man3/posix_memalign.3:48
1147 msgid ""
1148 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1149 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1150
1151 #. type: Plain text
1152 #: build/C/man2/madvise.2:50
1153 msgid "B<madvise>(): _BSD_SOURCE"
1154 msgstr "B<madvise>(): _BSD_SOURCE"
1155
1156 #. type: Plain text
1157 #: build/C/man2/madvise.2:68
1158 msgid ""
1159 "The B<madvise>()  system call advises the kernel about how to handle paging "
1160 "input/output in the address range beginning at address I<addr> and with size "
1161 "I<length> bytes.  It allows an application to tell the kernel how it expects "
1162 "to use some mapped or shared memory areas, so that the kernel can choose "
1163 "appropriate read-ahead and caching techniques.  This call does not influence "
1164 "the semantics of the application (except in the case of B<MADV_DONTNEED>), "
1165 "but may influence its performance.  The kernel is free to ignore the advice."
1166 msgstr ""
1167 "B<madvise>()  システムコールは、アドレス I<addr> からはじまる I<length> バイ"
1168 "トのメモリブロックのページング入出力をどう扱えば良いか、 カーネルにアドバイス"
1169 "する。 これを用いると、 アプリケーションからカーネルに、 マップされたメモリや"
1170 "共有メモリをどのように扱ってほしいか伝えることができ、 カーネルはそれに応じて"
1171 "先読みやキャッシュなどの適切な手法を選択できる。 このコールはアプリケーション"
1172 "の動作そのものには影響しない (B<MADV_DONTNEED> の場合は別) が、 性能には影響"
1173 "しうる。 なおこのアドバイスを受け入れるかどうかはカーネルに任される。"
1174
1175 #. type: Plain text
1176 #: build/C/man2/madvise.2:72
1177 msgid "The advice is indicated in the I<advice> argument which can be"
1178 msgstr ""
1179 "アドバイスは引き数 I<advice> によって与える。以下のいずれかを指定できる。"
1180
1181 #. type: TP
1182 #: build/C/man2/madvise.2:72
1183 #, no-wrap
1184 msgid "B<MADV_NORMAL>"
1185 msgstr "B<MADV_NORMAL>"
1186
1187 #. type: Plain text
1188 #: build/C/man2/madvise.2:76
1189 msgid "No special treatment.  This is the default."
1190 msgstr "特別な扱いは行わない。これがデフォルトである。"
1191
1192 #. type: TP
1193 #: build/C/man2/madvise.2:76
1194 #, no-wrap
1195 msgid "B<MADV_RANDOM>"
1196 msgstr "B<MADV_RANDOM>"
1197
1198 #. type: Plain text
1199 #: build/C/man2/madvise.2:80
1200 msgid ""
1201 "Expect page references in random order.  (Hence, read ahead may be less "
1202 "useful than normally.)"
1203 msgstr ""
1204 "ページ参照はランダムな順序で行われそうだ。 (したがって、先読みはあまり効果が"
1205 "なさそうだ。)"
1206
1207 #. type: TP
1208 #: build/C/man2/madvise.2:80
1209 #, no-wrap
1210 msgid "B<MADV_SEQUENTIAL>"
1211 msgstr "B<MADV_SEQUENTIAL>"
1212
1213 #. type: Plain text
1214 #: build/C/man2/madvise.2:85
1215 msgid ""
1216 "Expect page references in sequential order.  (Hence, pages in the given "
1217 "range can be aggressively read ahead, and may be freed soon after they are "
1218 "accessed.)"
1219 msgstr ""
1220 "ページ参照はシーケンシャルな順序で行われそうだ。 (したがって与えた範囲のペー"
1221 "ジは積極的に先読みしておくと良いだろう。 またアクセスが終わったら速やかに解放"
1222 "して良い。)"
1223
1224 #. type: TP
1225 #: build/C/man2/madvise.2:85
1226 #, no-wrap
1227 msgid "B<MADV_WILLNEED>"
1228 msgstr "B<MADV_WILLNEED>"
1229
1230 #. type: Plain text
1231 #: build/C/man2/madvise.2:89
1232 msgid ""
1233 "Expect access in the near future.  (Hence, it might be a good idea to read "
1234 "some pages ahead.)"
1235 msgstr ""
1236 "近い将来にアクセスされそうだ。 (したがってこれらのページを今のうちに先読みし"
1237 "ておくといいだろう。)"
1238
1239 #. type: TP
1240 #: build/C/man2/madvise.2:89
1241 #, no-wrap
1242 msgid "B<MADV_DONTNEED>"
1243 msgstr "B<MADV_DONTNEED>"
1244
1245 #. type: Plain text
1246 #: build/C/man2/madvise.2:100
1247 msgid ""
1248 "Do not expect access in the near future.  (For the time being, the "
1249 "application is finished with the given range, so the kernel can free "
1250 "resources associated with it.)  Subsequent accesses of pages in this range "
1251 "will succeed, but will result either in reloading of the memory contents "
1252 "from the underlying mapped file (see B<mmap>(2))  or zero-fill-on-demand "
1253 "pages for mappings without an underlying file."
1254 msgstr ""
1255 "しばらくアクセスはなさそうだ。 (現時点でアプリケーションは与えた範囲の処理を"
1256 "終えている。 したがってカーネルはこれに関連するリソースを解放して良い。)  こ"
1257 "れ以降この範囲のページへのアクセスがあると、 成功はするが、メモリの内容をマッ"
1258 "プ元のファイルからロードし直すことになる (B<mmap>(2)  を見よ) か、 または元"
1259 "ファイルがないマップページでは アクセスがあったときに 0 埋めが行われることに"
1260 "なる。"
1261
1262 #. type: TP
1263 #: build/C/man2/madvise.2:100
1264 #, no-wrap
1265 msgid "B<MADV_REMOVE> (Since Linux 2.6.16)"
1266 msgstr "B<MADV_REMOVE> (Linux 2.6.16 以降)"
1267
1268 #.  2.6.18-rc5
1269 #.  Databases want to use this feature to drop a section of their
1270 #.  bufferpool (shared memory segments) - without writing back to
1271 #.  disk/swap space.  This feature is also useful for supporting
1272 #.  hot-plug memory on UML.
1273 #. type: Plain text
1274 #: build/C/man2/madvise.2:113
1275 msgid ""
1276 "Free up a given range of pages and its associated backing store.  Currently, "
1277 "only shmfs/tmpfs supports this; other file systems return with the error "
1278 "B<ENOSYS>."
1279 msgstr ""
1280 "指定された範囲のページと関連するバッキングストアを解放する。 現在のところ、 "
1281 "shmfs/tmpfs だけがこれに対応している。 他のファイルシステムでは B<ENOSYS> が"
1282 "返される。"
1283
1284 #. type: TP
1285 #: build/C/man2/madvise.2:113
1286 #, no-wrap
1287 msgid "B<MADV_DONTFORK> (Since Linux 2.6.16)"
1288 msgstr "B<MADV_DONTFORK> (Linux 2.6.16 以降)"
1289
1290 #.  See http://lwn.net/Articles/171941/
1291 #.  [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
1292 #.  Currently, copy-on-write may change the physical address of
1293 #.  a page even if the user requested that the page is pinned in
1294 #.  memory (either by mlock or by get_user_pages).  This happens
1295 #.  if the process forks meanwhile, and the parent writes to that
1296 #.  page.  As a result, the page is orphaned: in case of
1297 #.  get_user_pages, the application will never see any data hardware
1298 #.  DMA's into this page after the COW.  In case of mlock'd memory,
1299 #.  the parent is not getting the realtime/security benefits of mlock.
1300 #.  In particular, this affects the Infiniband modules which do DMA from
1301 #.  and into user pages all the time.
1302 #.  This patch adds madvise options to control whether memory range is
1303 #.  inherited across fork. Useful e.g. for when hardware is doing DMA
1304 #.  from/into these pages.  Could also be useful to an application
1305 #.  wanting to speed up its forks by cutting large areas out of
1306 #.  consideration.
1307 #.  SEE ALSO: http://lwn.net/Articles/171941/
1308 #.  "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
1309 #. type: Plain text
1310 #: build/C/man2/madvise.2:144
1311 msgid ""
1312 "Do not make the pages in this range available to the child after a B<fork>"
1313 "(2).  This is useful to prevent copy-on-write semantics from changing the "
1314 "physical location of a page(s) if the parent writes to it after a B<fork>"
1315 "(2).  (Such page relocations cause problems for hardware that DMAs into the "
1316 "page(s).)"
1317 msgstr ""
1318 "B<fork>(2)  が行われた後、指定された範囲のページを子プロセスが利用できないよ"
1319 "うにする。 この機能は、書き込み時コピー (copy-on-write) 方式で、 B<fork>(2)  "
1320 "の後で親プロセスがページに書き込みを行った場合に ページの物理位置が変化しない"
1321 "ようにするのに有効である (ページの再配置はハードウェアがそのページに DMA 転送"
1322 "を行うような場合に 問題を起こすことがある)。"
1323
1324 #. type: TP
1325 #: build/C/man2/madvise.2:144
1326 #, no-wrap
1327 msgid "B<MADV_DOFORK> (Since Linux 2.6.16)"
1328 msgstr "B<MADV_DOFORK> (Linux 2.6.16 以降)"
1329
1330 #. type: Plain text
1331 #: build/C/man2/madvise.2:150
1332 msgid ""
1333 "Undo the effect of B<MADV_DONTFORK>, restoring the default behavior, whereby "
1334 "a mapping is inherited across B<fork>(2)."
1335 msgstr ""
1336 "B<MADV_DONTFORK> の影響を取り消し、デフォルトの動作に戻す。 つまり、 B<fork>"
1337 "(2)  の前後でマッピングは継承されるようになる。"
1338
1339 #. type: TP
1340 #: build/C/man2/madvise.2:150
1341 #, no-wrap
1342 msgid "B<MADV_HWPOISON> (Since Linux 2.6.32)"
1343 msgstr "B<MADV_HWPOISON> (Linux 2.6.32 以降)"
1344
1345 #. type: Plain text
1346 #: build/C/man2/madvise.2:162
1347 msgid ""
1348 "Poison a page and handle it like a hardware memory corruption.  This "
1349 "operation is only available for privileged (B<CAP_SYS_ADMIN>)  processes.  "
1350 "This operation may result in the calling process receiving a B<SIGBUS> and "
1351 "the page being unmapped.  This feature is intended for testing of memory "
1352 "error-handling code; it is only available if the kernel was configured with "
1353 "B<CONFIG_MEMORY_FAILURE>."
1354 msgstr ""
1355
1356 #. type: TP
1357 #: build/C/man2/madvise.2:162
1358 #, no-wrap
1359 msgid "B<MADV_SOFT_OFFLINE> (Since Linux 2.6.33)"
1360 msgstr "B<MADV_SOFT_OFFLINE> (Linux 2.6.33 以降)"
1361
1362 #. type: Plain text
1363 #: build/C/man2/madvise.2:180
1364 msgid ""
1365 "Soft offline the pages in the range specified by I<addr> and I<length>.  The "
1366 "memory of each page in the specified range is preserved (i.e., when next "
1367 "accessed, the same content will be visible, but in a new physical page "
1368 "frame), and the original page is offlined (i.e., no longer used, and taken "
1369 "out of normal memory management).  The effect of the B<MADV_SOFT_OFFLINE> "
1370 "operation is invisible to (i.e., does not change the semantics of)  the "
1371 "calling process.  This feature is intended for testing of memory error-"
1372 "handling code; it is only available if the kernel was configured with "
1373 "B<CONFIG_MEMORY_FAILURE>."
1374 msgstr ""
1375
1376 #. type: TP
1377 #: build/C/man2/madvise.2:180
1378 #, no-wrap
1379 msgid "B<MADV_MERGEABLE> (since Linux 2.6.32)"
1380 msgstr "B<MADV_MERGEABLE> (Linux 2.6.32 以降)"
1381
1382 #. type: Plain text
1383 #: build/C/man2/madvise.2:205
1384 msgid ""
1385 "Enable Kernel Samepage Merging (KSM) for the pages in the range specified by "
1386 "I<addr> and I<length>.  The kernel regularly scans those areas of user "
1387 "memory that have been marked as mergeable, looking for pages with identical "
1388 "content.  These are replaced by a single write-protected page (which is "
1389 "automatically copied if a process later wants to update the content of the "
1390 "page).  KSM only merges private anonymous pages (see B<mmap>(2)).  The KSM "
1391 "feature is intended for applications that generate many instances of the "
1392 "same data (e.g., virtualization systems such as KVM).  It can consume a lot "
1393 "of processing power; use with care.  See the kernel source file "
1394 "I<Documentation/vm/ksm.txt> for more details.  The B<MADV_MERGEABLE> and "
1395 "B<MADV_UNMERGEABLE> operations are only available if the kernel was "
1396 "configured with B<CONFIG_KSM>."
1397 msgstr ""
1398
1399 #. type: TP
1400 #: build/C/man2/madvise.2:205
1401 #, no-wrap
1402 msgid "B<MADV_UNMERGEABLE> (since Linux 2.6.32)"
1403 msgstr "B<MADV_UNMERGEABLE> (Linux 2.6.32 以降)"
1404
1405 #. type: Plain text
1406 #: build/C/man2/madvise.2:214
1407 msgid ""
1408 "Undo the effect of an earlier B<MADV_MERGEABLE> operation on the specified "
1409 "address range; KSM unmerges whatever pages it had merged in the address "
1410 "range specified by I<addr> and I<length>."
1411 msgstr ""
1412
1413 #. type: TP
1414 #: build/C/man2/madvise.2:214
1415 #, no-wrap
1416 msgid "B<MADV_HUGEPAGE> (since Linux 2.6.38)"
1417 msgstr "B<MADV_HUGEPAGE> (Linux 2.6.38 以降)"
1418
1419 #.  http://lwn.net/Articles/358904/
1420 #.  https://lwn.net/Articles/423584/
1421 #. type: Plain text
1422 #: build/C/man2/madvise.2:243
1423 msgid ""
1424 "Enables Transparent Huge Pages (THP) for pages in the range specified by "
1425 "I<addr> and I<length>.  Currently, Transparent Huge Pages only work with "
1426 "private anonymous pages (see B<mmap>(2)).  The kernel will regularly scan "
1427 "the areas marked as huge page candidates to replace them with huge pages.  "
1428 "The kernel will also allocate huge pages directly when the region is "
1429 "naturally aligned to the huge page size (see B<posix_memalign>(2)).  This "
1430 "feature is primarily aimed at applications that use large mappings of data "
1431 "and access large regions of that memory at a time (e.g. virtualization "
1432 "systems such as QEMU).  It can very easily waste memory (e.g. a 2MB mapping "
1433 "that only ever accesses 1 byte will result in 2MB of wired memory instead of "
1434 "one 4KB page).  See the kernel source file I<Documentation/vm/transhuge.txt> "
1435 "for more details.  The B<MADV_HUGEPAGE> and B<MADV_NOHUGEPAGE> operations "
1436 "are only available if the kernel was configured with "
1437 "B<CONFIG_TRANSPARENT_HUGEPAGE>."
1438 msgstr ""
1439
1440 #. type: TP
1441 #: build/C/man2/madvise.2:243
1442 #, no-wrap
1443 msgid "B<MADV_NOHUGEPAGE> (since Linux 2.6.38)"
1444 msgstr "B<MADV_NOHUGEPAGE> (Linux 2.6.38 以降)"
1445
1446 #. type: Plain text
1447 #: build/C/man2/madvise.2:250
1448 msgid ""
1449 "Ensures that memory in the address range specified by I<addr> and I<length> "
1450 "will not be collapsed into huge pages."
1451 msgstr ""
1452
1453 #. type: Plain text
1454 #: build/C/man2/madvise.2:257
1455 msgid ""
1456 "On success B<madvise>()  returns zero.  On error, it returns -1 and I<errno> "
1457 "is set appropriately."
1458 msgstr ""
1459 "B<madvise>()  は成功すると 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
1460 "を適切な値に設定する。"
1461
1462 #. type: TP
1463 #: build/C/man2/madvise.2:258 build/C/man2/mlock.2:155 build/C/man2/mmap.2:411
1464 #: build/C/man2/mremap.2:137
1465 #, no-wrap
1466 msgid "B<EAGAIN>"
1467 msgstr "B<EAGAIN>"
1468
1469 #. type: Plain text
1470 #: build/C/man2/madvise.2:261
1471 msgid "A kernel resource was temporarily unavailable."
1472 msgstr "何らかのカーネルリソースが一時的に利用できなかった。"
1473
1474 #. type: Plain text
1475 #: build/C/man2/madvise.2:264
1476 msgid "The map exists, but the area maps something that isn't a file."
1477 msgstr "指定したマップは存在するが、ファイルではないところをマップしている。"
1478
1479 #. type: Plain text
1480 #: build/C/man2/madvise.2:267
1481 msgid "This error can occur for the following reasons:"
1482 msgstr ""
1483
1484 #. type: IP
1485 #: build/C/man2/madvise.2:268 build/C/man2/madvise.2:274
1486 #: build/C/man2/madvise.2:277 build/C/man2/madvise.2:280
1487 #: build/C/man2/madvise.2:283 build/C/man3/mallopt.3:233
1488 #: build/C/man3/mallopt.3:239
1489 #, no-wrap
1490 msgid "*"
1491 msgstr "*"
1492
1493 #.  .I len
1494 #.  is zero,
1495 #. type: Plain text
1496 #: build/C/man2/madvise.2:274
1497 msgid "The value I<len> is negative."
1498 msgstr "I<len> が負の値である。"
1499
1500 #. type: Plain text
1501 #: build/C/man2/madvise.2:277
1502 msgid "I<addr> is not page-aligned."
1503 msgstr ""
1504
1505 #. type: Plain text
1506 #: build/C/man2/madvise.2:280
1507 msgid "I<advice> is not a valid value"
1508 msgstr "I<advice> が有効な値でない。"
1509
1510 #. type: Plain text
1511 #: build/C/man2/madvise.2:283
1512 msgid ""
1513 "The application is attempting to release locked or shared pages (with "
1514 "B<MADV_DONTNEED>)."
1515 msgstr ""
1516 "アプリケーションがロックされたページや共有ページを (B<MADV_DONTNEED> で) 解"
1517 "放\n"
1518 "しようとしている。"
1519
1520 #. type: Plain text
1521 #: build/C/man2/madvise.2:291
1522 msgid ""
1523 "B<MADV_MERGEABLE> or B<MADV_UNMERGEABLE> was specified in I<advice>, but the "
1524 "kernel was not configured with B<CONFIG_KSM>."
1525 msgstr ""
1526
1527 #. type: Plain text
1528 #: build/C/man2/madvise.2:298
1529 msgid ""
1530 "(for B<MADV_WILLNEED>)  Paging in this area would exceed the process's "
1531 "maximum resident set size."
1532 msgstr ""
1533 "(B<MADV_WILLNEED> の場合) この範囲のページングを行うと、 プロセスの RSS "
1534 "(resident set size) の最大値を越えてしまう。"
1535
1536 #. type: TP
1537 #: build/C/man2/madvise.2:298 build/C/man2/madvise.2:303
1538 #: build/C/man2/mlock.2:124 build/C/man2/mlock.2:132 build/C/man2/mlock.2:170
1539 #: build/C/man2/mmap.2:454 build/C/man2/mprotect.2:94
1540 #: build/C/man2/mprotect.2:97 build/C/man2/mremap.2:180
1541 #: build/C/man2/msync.2:93 build/C/man3/posix_memalign.3:162
1542 #: build/C/man2/shmctl.2:326 build/C/man2/shmget.2:211
1543 #: build/C/man2/shmop.2:209 build/C/man2/subpage_prot.2:82
1544 #: build/C/man2/sync_file_range.2:163
1545 #, no-wrap
1546 msgid "B<ENOMEM>"
1547 msgstr "B<ENOMEM>"
1548
1549 #. type: Plain text
1550 #: build/C/man2/madvise.2:303
1551 msgid "(for B<MADV_WILLNEED>)  Not enough memory: paging in failed."
1552 msgstr "(B<MADV_WILLNEED> の場合) メモリが足りず、ページングに失敗した。"
1553
1554 #. type: Plain text
1555 #: build/C/man2/madvise.2:307
1556 msgid ""
1557 "Addresses in the specified range are not currently mapped, or are outside "
1558 "the address space of the process."
1559 msgstr ""
1560 "指定した範囲のアドレスが、現在マップされていない。 あるいはプロセスのアドレス"
1561 "空間の内部にない。"
1562
1563 #.  FIXME . Write a posix_fadvise(3) page.
1564 #. type: Plain text
1565 #: build/C/man2/madvise.2:319
1566 msgid ""
1567 "POSIX.1b.  POSIX.1-2001 describes B<posix_madvise>(3)  with constants "
1568 "B<POSIX_MADV_NORMAL>, etc., with a behavior close to that described here.  "
1569 "There is a similar B<posix_fadvise>(2)  for file access."
1570 msgstr ""
1571 "POSIX.1b.  POSIX.1-2001 では、 B<posix_madvise>(3)  を B<POSIX_MADV_NORMAL> "
1572 "などの定数とともに記述していた (それぞれの振る舞いはここで述べたものに近"
1573 "い)。 ファイルアクセスに対しても B<posix_fadvise>(2)  という類似の関数が存在"
1574 "する。"
1575
1576 #. type: Plain text
1577 #: build/C/man2/madvise.2:328
1578 msgid ""
1579 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>, "
1580 "B<MADV_MERGEABLE>, and B<MADV_UNMERGEABLE> are Linux-specific."
1581 msgstr ""
1582 "B<MADV_REMOVE>, B<MADV_DONTFORK>, B<MADV_DOFORK>, B<MADV_HWPOISON>,\n"
1583 "B<MADV_MERGEABLE>, B<MADV_UNMERGEABLE> は Linux 固有である。"
1584
1585 #. type: SS
1586 #: build/C/man2/madvise.2:329 build/C/man2/mlock.2:268
1587 #: build/C/man2/shmget.2:278
1588 #, no-wrap
1589 msgid "Linux Notes"
1590 msgstr "Linux での注意"
1591
1592 #. type: Plain text
1593 #: build/C/man2/madvise.2:337
1594 msgid ""
1595 "The current Linux implementation (2.4.0) views this system call more as a "
1596 "command than as advice and hence may return an error when it cannot do what "
1597 "it usually would do in response to this advice.  (See the ERRORS description "
1598 "above.)  This is nonstandard behavior."
1599 msgstr ""
1600 "現在の Linux の実装 (2.4.0) では、 このシステムコールをアドバイスというよりは"
1601 "命令と見ている。 したがってこのアドバイスに対して通常行われる動作が不可能な場"
1602 "合は、 エラーを返すことがある (上記の エラー の記述を参照)。 この振舞いは標準"
1603 "とは異なる。"
1604
1605 #.  .SH HISTORY
1606 #.  The
1607 #.  .BR madvise ()
1608 #.  function first appeared in 4.4BSD.
1609 #. type: Plain text
1610 #: build/C/man2/madvise.2:353
1611 msgid ""
1612 "The Linux implementation requires that the address I<addr> be page-aligned, "
1613 "and allows I<length> to be zero.  If there are some parts of the specified "
1614 "address range that are not mapped, the Linux version of B<madvise>()  "
1615 "ignores them and applies the call to the rest (but returns B<ENOMEM> from "
1616 "the system call, as it should)."
1617 msgstr ""
1618 "Linux の実装では I<addr> のアドレスはページ境界の値でなければならない。また "
1619 "I<length> は 0 であっても構わない。 また Linux 版の B<madvise>()  では、指定"
1620 "されたアドレス範囲にマップされていない部分があると、 これらを無視して残りの部"
1621 "分にアドバイスを適用する (しかしシステムコールに対してはちゃんと B<ENOMEM> を"
1622 "返す)。"
1623
1624 #. type: Plain text
1625 #: build/C/man2/madvise.2:360
1626 msgid ""
1627 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1628 "B<munmap>(2)"
1629 msgstr ""
1630 "B<getrlimit>(2), B<mincore>(2), B<mmap>(2), B<mprotect>(2), B<msync>(2), "
1631 "B<munmap>(2)"
1632
1633 #. type: TH
1634 #: build/C/man3/malloc_get_state.3:23
1635 #, no-wrap
1636 msgid "MALLOC_GET_STATE"
1637 msgstr "MALLOC_GET_STATE"
1638
1639 #. type: TH
1640 #: build/C/man3/malloc_get_state.3:23
1641 #, no-wrap
1642 msgid "2012-03-26"
1643 msgstr "2012-03-26"
1644
1645 #. type: Plain text
1646 #: build/C/man3/malloc_get_state.3:26
1647 msgid ""
1648 "get_malloc_state, set_malloc_state - record and restore state of malloc "
1649 "implementation"
1650 msgstr ""
1651
1652 #. type: Plain text
1653 #: build/C/man3/malloc_get_state.3:29 build/C/man3/posix_memalign.3:34
1654 #, no-wrap
1655 msgid "B<#include E<lt>stdlib.hE<gt>>\n"
1656 msgstr "B<#include E<lt>stdlib.hE<gt>>\n"
1657
1658 #. type: Plain text
1659 #: build/C/man3/malloc_get_state.3:31
1660 #, no-wrap
1661 msgid "B<void* malloc_get_state(void);>\n"
1662 msgstr "B<void* malloc_get_state(void);>\n"
1663
1664 #. type: Plain text
1665 #: build/C/man3/malloc_get_state.3:33
1666 #, no-wrap
1667 msgid "B<int malloc_set_state(void *>I<state>B<);>\n"
1668 msgstr "B<int malloc_set_state(void *>I<state>B<);>\n"
1669
1670 #. type: Plain text
1671 #: build/C/man3/malloc_get_state.3:51
1672 msgid ""
1673 "The B<malloc_get_state>()  function records the current state of all "
1674 "B<malloc>(3)  internal bookkeeping variables (but not the actual contents of "
1675 "the heap or the state of B<malloc_hook>(3)  functions pointers).  The state "
1676 "is recorded in a system-dependent opaque data structure dynamically "
1677 "allocated via B<malloc>(3), and a pointer to that data structure is returned "
1678 "as the function result.  (It is the caller's responsibility to B<free>(3)  "
1679 "this memory.)"
1680 msgstr ""
1681
1682 #. type: Plain text
1683 #: build/C/man3/malloc_get_state.3:59
1684 msgid ""
1685 "The B<malloc_set_state>()  function restores the state of all B<malloc>(3)  "
1686 "internal bookkeeping variables to the values recorded in the opaque data "
1687 "structure pointed to by I<state>."
1688 msgstr ""
1689
1690 #. type: Plain text
1691 #: build/C/man3/malloc_get_state.3:66
1692 msgid ""
1693 "On success, B<malloc_get_state>()  returns a pointer to a newly allocated "
1694 "opaque data structure.  On error (for example, memory could not be allocated "
1695 "for the data structure), B<malloc_get_state>()  returns NULL."
1696 msgstr ""
1697
1698 #.  if(ms->magic != MALLOC_STATE_MAGIC) return -1;
1699 #.  /* Must fail if the major version is too high. */
1700 #.  if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
1701 #. type: Plain text
1702 #: build/C/man3/malloc_get_state.3:84
1703 msgid ""
1704 "On success, B<malloc_set_state>()  returns 0.  If the implementation detects "
1705 "that I<state> does not point to a correctly formed data structure, "
1706 "B<malloc_set_state>()  returns -1.  If the implementation detects that the "
1707 "version of the data structure referred to by I<state> is a more recent "
1708 "version than this implementation knows about, B<malloc_set_state>()  returns "
1709 "-2."
1710 msgstr ""
1711
1712 #. type: Plain text
1713 #: build/C/man3/malloc_get_state.3:86 build/C/man3/malloc_hook.3:78
1714 #: build/C/man3/mcheck.3:146 build/C/man3/mtrace.3:78
1715 msgid "These functions are GNU extensions."
1716 msgstr "これらの関数は GNU による拡張である。"
1717
1718 #. type: Plain text
1719 #: build/C/man3/malloc_get_state.3:92
1720 msgid ""
1721 "These functions are especially useful when using this B<malloc>(3)  "
1722 "implementation as part of a shared library, and the heap contents are saved/"
1723 "restored via some other method.  This technique is used by the GNU Emacs to "
1724 "implement its \"dumping\" function."
1725 msgstr ""
1726
1727 #.  i.e., calls __malloc_check_init()
1728 #.  i.e., malloc checking is not already in use
1729 #.  and the caller requested malloc checking
1730 #. type: Plain text
1731 #: build/C/man3/malloc_get_state.3:109
1732 msgid ""
1733 "Hook function pointers are never saved or restored by these functions, with "
1734 "two exceptions: if malloc checking (see B<mallopt>(3))  was in use when "
1735 "B<malloc_get_state>()  was called, then B<malloc_set_state>()  resets malloc "
1736 "checking hooks if possible; if malloc checking was not in use in the "
1737 "recorded state, but the caller has requested malloc checking, then the hooks "
1738 "are reset to 0."
1739 msgstr ""
1740
1741 #. type: Plain text
1742 #: build/C/man3/malloc_get_state.3:112
1743 msgid "B<malloc>(3), B<mallopt>(3)"
1744 msgstr "B<malloc>(3), B<mallopt>(3)"
1745
1746 #. type: TH
1747 #: build/C/man3/malloc_hook.3:6
1748 #, no-wrap
1749 msgid "MALLOC_HOOK"
1750 msgstr "MALLOC_HOOK"
1751
1752 #. type: TH
1753 #: build/C/man3/malloc_hook.3:6
1754 #, no-wrap
1755 msgid "2010-10-13"
1756 msgstr "2010-10-13"
1757
1758 #. type: Plain text
1759 #: build/C/man3/malloc_hook.3:11
1760 msgid ""
1761 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1762 "__realloc_hook, __after_morecore_hook - malloc debugging variables"
1763 msgstr ""
1764 "__malloc_hook, __malloc_initialize_hook, __memalign_hook, __free_hook, "
1765 "__realloc_hook, __after_morecore_hook - malloc デバッグ用の変数"
1766
1767 #. type: Plain text
1768 #: build/C/man3/malloc_hook.3:14 build/C/man3/posix_memalign.3:40
1769 #, no-wrap
1770 msgid "B<#include E<lt>malloc.hE<gt>>\n"
1771 msgstr "B<#include E<lt>malloc.hE<gt>>\n"
1772
1773 #. type: Plain text
1774 #: build/C/man3/malloc_hook.3:16
1775 #, no-wrap
1776 msgid "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1777 msgstr "B<void *(*__malloc_hook)(size_t >I<size>B<, const void *>I<caller>B<);>\n"
1778
1779 #. type: Plain text
1780 #: build/C/man3/malloc_hook.3:19
1781 #, no-wrap
1782 msgid "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1783 msgstr "B<void *(*__realloc_hook)(void *>I<ptr>B<, size_t >I<size>B<, const void *>I<caller>B<);>\n"
1784
1785 #. type: Plain text
1786 #: build/C/man3/malloc_hook.3:22
1787 #, no-wrap
1788 msgid ""
1789 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1790 "B<                         const void *>I<caller>B<);>\n"
1791 msgstr ""
1792 "B<void *(*__memalign_hook)(size_t >I<alignment>B<, size_t >I<size>B<,>\n"
1793 "B<                         const void *>I<caller>B<);>\n"
1794
1795 #. type: Plain text
1796 #: build/C/man3/malloc_hook.3:24
1797 #, no-wrap
1798 msgid "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1799 msgstr "B<void (*__free_hook)(void *>I<ptr>B<, const void *>I<caller>B<);>\n"
1800
1801 #. type: Plain text
1802 #: build/C/man3/malloc_hook.3:26
1803 #, no-wrap
1804 msgid "B<void (*__malloc_initialize_hook)(void);>\n"
1805 msgstr "B<void (*__malloc_initialize_hook)(void);>\n"
1806
1807 #. type: Plain text
1808 #: build/C/man3/malloc_hook.3:28
1809 #, no-wrap
1810 msgid "B<void (*__after_morecore_hook)(void);>\n"
1811 msgstr "B<void (*__after_morecore_hook)(void);>\n"
1812
1813 #. type: Plain text
1814 #: build/C/man3/malloc_hook.3:39
1815 msgid ""
1816 "The GNU C library lets you modify the behavior of B<malloc>(3), B<realloc>"
1817 "(3), and B<free>(3)  by specifying appropriate hook functions.  You can use "
1818 "these hooks to help you debug programs that use dynamic memory allocation, "
1819 "for example."
1820 msgstr ""
1821 "GNU C ライブラリでは、適切なフック関数 (hook function) を指定することで "
1822 "B<malloc>(3), B<realloc>(3), B<free>(3)  の動作を変更することができる。例え"
1823 "ば、動的にメモリ割り当てを行う プログラムのデバッグにこれらのフックを使うこと"
1824 "ができる。"
1825
1826 #. type: Plain text
1827 #: build/C/man3/malloc_hook.3:46
1828 msgid ""
1829 "The variable B<__malloc_initialize_hook> points at a function that is called "
1830 "once when the malloc implementation is initialized.  This is a weak "
1831 "variable, so it can be overridden in the application with a definition like "
1832 "the following:"
1833 msgstr ""
1834 "変数 B<__malloc_initialize_hook> は malloc の実装が初期化される際に一度だけ呼"
1835 "ばれる関数へのポインタである。 この変数は書き換え可能 (weak) であり、アプリ"
1836 "ケーション内で 以下のような定義で上書きできる:"
1837
1838 #. type: Plain text
1839 #: build/C/man3/malloc_hook.3:49
1840 #, no-wrap
1841 msgid "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1842 msgstr "    void (*__malloc_initialize_hook)(void) = my_init_hook;\n"
1843
1844 #. type: Plain text
1845 #: build/C/man3/malloc_hook.3:54
1846 msgid ""
1847 "Now the function I<my_init_hook>()  can do the initialization of all hooks."
1848 msgstr ""
1849 "なお、関数 I<my_init_hook>()  で全てのフックの初期化をすることができる。"
1850
1851 #. type: Plain text
1852 #: build/C/man3/malloc_hook.3:70
1853 msgid ""
1854 "The four functions pointed to by B<__malloc_hook>, B<__realloc_hook>, "
1855 "B<__memalign_hook>, B<__free_hook> have a prototype like the functions "
1856 "B<malloc>(3), B<realloc>(3), B<memalign>(3), B<free>(3), respectively, "
1857 "except that they have a final argument I<caller> that gives the address of "
1858 "the caller of B<malloc>(3), etc."
1859 msgstr ""
1860 "B<__malloc_hook>, B<__realloc_hook>, B<__memalign_hook>, B<__free_hook> で指"
1861 "される 4 つの関数は、各々 B<malloc>(3), B<realloc>(3), B<memalign>(3), "
1862 "B<free>(3)  とよく似たプロトタイプを持っているが、 一番最後の引き数 "
1863 "I<caller> をとる点が異なる。 引き数 I<caller> には、 B<malloc>(3)  などの呼び"
1864 "出し元 (caller) のアドレスが格納される。"
1865
1866 #. type: Plain text
1867 #: build/C/man3/malloc_hook.3:76
1868 msgid ""
1869 "The variable B<__after_morecore_hook> points at a function that is called "
1870 "each time after B<sbrk>(2)  was asked for more memory."
1871 msgstr ""
1872 "変数 B<__after_morecore_hook> は、領域の追加要求があり B<sbrk>(2)  が呼ばれた"
1873 "後で毎回呼び出される関数へのポインタである。"
1874
1875 #.  https://bugzilla.redhat.com/show_bug.cgi?id=450187
1876 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=9957
1877 #. type: Plain text
1878 #: build/C/man3/malloc_hook.3:85
1879 msgid ""
1880 "The use of these hook functions is not safe in multithreaded programs, and "
1881 "they are now deprecated.  Programmers should instead preempt calls to the "
1882 "relevant functions by defining and exporting functions such as \"malloc\" "
1883 "and \"free\"."
1884 msgstr ""
1885
1886 #. type: SH
1887 #: build/C/man3/malloc_hook.3:85 build/C/man3/mallopt.3:464
1888 #: build/C/man3/mcheck.3:159 build/C/man2/mmap.2:571
1889 #: build/C/man2/mprotect.2:142 build/C/man3/mtrace.3:106
1890 #, no-wrap
1891 msgid "EXAMPLE"
1892 msgstr "例"
1893
1894 #. type: Plain text
1895 #: build/C/man3/malloc_hook.3:87
1896 msgid "Here is a short example of how to use these variables."
1897 msgstr "これらの変数の使い方の簡単な例を以下に示す。"
1898
1899 #. type: Plain text
1900 #: build/C/man3/malloc_hook.3:91
1901 #, no-wrap
1902 msgid ""
1903 "#include E<lt>stdio.hE<gt>\n"
1904 "#include E<lt>malloc.hE<gt>\n"
1905 msgstr ""
1906 "#include E<lt>stdio.hE<gt>\n"
1907 "#include E<lt>malloc.hE<gt>\n"
1908
1909 #. type: Plain text
1910 #: build/C/man3/malloc_hook.3:95
1911 #, no-wrap
1912 msgid ""
1913 "/* Prototypes for our hooks.  */\n"
1914 "static void my_init_hook(void);\n"
1915 "static void *my_malloc_hook(size_t, const void *);\n"
1916 msgstr ""
1917 "/* 使おうとするフックのプロトタイプ宣言 */\n"
1918 "static void my_init_hook(void);\n"
1919 "static void *my_malloc_hook(size_t, const void *);\n"
1920
1921 #. type: Plain text
1922 #: build/C/man3/malloc_hook.3:98
1923 #, no-wrap
1924 msgid ""
1925 "/* Variables to save original hooks. */\n"
1926 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1927 msgstr ""
1928 "/* 元々のフックを保存するための変数 */\n"
1929 "static void *(*old_malloc_hook)(size_t, const void *);\n"
1930
1931 #. type: Plain text
1932 #: build/C/man3/malloc_hook.3:101
1933 #, no-wrap
1934 msgid ""
1935 "/* Override initializing hook from the C library. */\n"
1936 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1937 msgstr ""
1938 "/* C ライブラリから呼ばれる初期化フックを上書きする */\n"
1939 "void (*__malloc_initialize_hook) (void) = my_init_hook;\n"
1940
1941 #. type: Plain text
1942 #: build/C/man3/malloc_hook.3:108
1943 #, no-wrap
1944 msgid ""
1945 "static void\n"
1946 "my_init_hook(void)\n"
1947 "{\n"
1948 "    old_malloc_hook = __malloc_hook;\n"
1949 "    __malloc_hook = my_malloc_hook;\n"
1950 "}\n"
1951 msgstr ""
1952 "static void\n"
1953 "my_init_hook(void)\n"
1954 "{\n"
1955 "    old_malloc_hook = __malloc_hook;\n"
1956 "    __malloc_hook = my_malloc_hook;\n"
1957 "}\n"
1958
1959 #. type: Plain text
1960 #: build/C/man3/malloc_hook.3:113
1961 #, no-wrap
1962 msgid ""
1963 "static void *\n"
1964 "my_malloc_hook(size_t size, const void *caller)\n"
1965 "{\n"
1966 "    void *result;\n"
1967 msgstr ""
1968 "static void *\n"
1969 "my_malloc_hook(size_t size, const void *caller)\n"
1970 "{\n"
1971 "    void *result;\n"
1972
1973 #. type: Plain text
1974 #: build/C/man3/malloc_hook.3:116
1975 #, no-wrap
1976 msgid ""
1977 "    /* Restore all old hooks */\n"
1978 "    __malloc_hook = old_malloc_hook;\n"
1979 msgstr ""
1980 "    /* 元々のフックを全て戻す */\n"
1981 "    __malloc_hook = old_malloc_hook;\n"
1982
1983 #. type: Plain text
1984 #: build/C/man3/malloc_hook.3:119
1985 #, no-wrap
1986 msgid ""
1987 "    /* Call recursively */\n"
1988 "    result = malloc(size);\n"
1989 msgstr ""
1990 "    /* malloc の再帰的呼び出し */\n"
1991 "    result = malloc(size);\n"
1992
1993 #. type: Plain text
1994 #: build/C/man3/malloc_hook.3:122
1995 #, no-wrap
1996 msgid ""
1997 "    /* Save underlying hooks */\n"
1998 "    old_malloc_hook = __malloc_hook;\n"
1999 msgstr ""
2000 "    /* 現在設定されているフック (underlying hook) を保存する */\n"
2001 "    old_malloc_hook = __malloc_hook;\n"
2002
2003 #. type: Plain text
2004 #: build/C/man3/malloc_hook.3:126
2005 #, no-wrap
2006 msgid ""
2007 "    /* printf() might call malloc(), so protect it too. */\n"
2008 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2009 "            (unsigned int) size, caller, result);\n"
2010 msgstr ""
2011 "    /* printf() は malloc() を呼び出す可能性があるので\n"
2012 "        ここでもガードを行う (元々のフックのままにしておく) */\n"
2013 "    printf(\"malloc(%u) called from %p returns %p\\en\",\n"
2014 "            (unsigned int) size, caller, result);\n"
2015
2016 #. type: Plain text
2017 #: build/C/man3/malloc_hook.3:129
2018 #, no-wrap
2019 msgid ""
2020 "    /* Restore our own hooks */\n"
2021 "    __malloc_hook = my_malloc_hook;\n"
2022 msgstr ""
2023 "    /* ユーザが使おうとするフックを再設定する */\n"
2024 "    __malloc_hook = my_malloc_hook;\n"
2025
2026 #. type: Plain text
2027 #: build/C/man3/malloc_hook.3:132
2028 #, no-wrap
2029 msgid ""
2030 "    return result;\n"
2031 "}\n"
2032 msgstr ""
2033 "    return result;\n"
2034 "}\n"
2035
2036 #. type: Plain text
2037 #: build/C/man3/malloc_hook.3:138
2038 msgid "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2039 msgstr "B<mallinfo>(3), B<malloc>(3), B<mcheck>(3), B<mtrace>(3)"
2040
2041 #. type: TH
2042 #: build/C/man3/malloc_trim.3:24
2043 #, no-wrap
2044 msgid "MALLOC_TRIM"
2045 msgstr "MALLOC_TRIM"
2046
2047 #. type: TH
2048 #: build/C/man3/malloc_trim.3:24 build/C/man3/malloc_usable_size.3:23
2049 #, no-wrap
2050 msgid "2012-03-29"
2051 msgstr "2012-03-29"
2052
2053 #. type: Plain text
2054 #: build/C/man3/malloc_trim.3:27
2055 msgid "malloc_trim - release free memory from the top of the heap"
2056 msgstr ""
2057
2058 #. type: Plain text
2059 #: build/C/man3/malloc_trim.3:29 build/C/man3/malloc_usable_size.3:28
2060 #: build/C/man3/mallopt.3:29
2061 msgid "B<#include E<lt>malloc.hE<gt>>"
2062 msgstr "B<#include E<lt>malloc.hE<gt>>"
2063
2064 #. type: Plain text
2065 #: build/C/man3/malloc_trim.3:31
2066 msgid "B<void malloc_trim(size_t >I<pad>B<);>"
2067 msgstr "B<void malloc_trim(size_t >I<pad>B<);>"
2068
2069 #. type: Plain text
2070 #: build/C/man3/malloc_trim.3:38
2071 msgid ""
2072 "The B<malloc_trim>()  function attempts to release free memory at the top of "
2073 "the heap (by calling B<sbrk>(2)  with a suitable argument)."
2074 msgstr ""
2075
2076 #. type: Plain text
2077 #: build/C/man3/malloc_trim.3:49
2078 msgid ""
2079 "The I<pad> argument specifies the amount of free space to leave untrimmed at "
2080 "the top of the heap.  If this argument is 0, only the minimum amount of "
2081 "memory is maintained at the top of the heap (i.e., one page or less).  A "
2082 "nonzero argument can be used to maintain some trailing space at the top of "
2083 "the heap in order to allow future allocations to be made without having to "
2084 "extend the heap with B<sbrk>(2)."
2085 msgstr ""
2086
2087 #. type: Plain text
2088 #: build/C/man3/malloc_trim.3:54
2089 msgid ""
2090 "The B<malloc_trim>()  function returns 1 if memory was actually released "
2091 "back to the system, or 0 if it was not possible to release any memory."
2092 msgstr ""
2093
2094 #.  .SH VERSIONS
2095 #.  Available already in glibc 2.0, possibly earlier
2096 #. type: Plain text
2097 #: build/C/man3/malloc_trim.3:58
2098 msgid "No errors are defined."
2099 msgstr ""
2100
2101 #. type: Plain text
2102 #: build/C/man3/malloc_trim.3:60 build/C/man3/malloc_usable_size.3:48
2103 msgid "This function is a GNU extension."
2104 msgstr "この関数は GNU による拡張である。"
2105
2106 #. type: Plain text
2107 #: build/C/man3/malloc_trim.3:69
2108 msgid ""
2109 "This function is automatically called by B<free>(3)  in certain "
2110 "circumstances; see the discussion of B<M_TOP_PAD> and B<M_TRIM_THRESHOLD> in "
2111 "B<mallopt>(3)."
2112 msgstr ""
2113
2114 #. type: Plain text
2115 #: build/C/man3/malloc_trim.3:72
2116 msgid ""
2117 "This function cannot release free memory located at places other than the "
2118 "top of the heap."
2119 msgstr ""
2120
2121 #.  malloc/malloc.c::mTRIm():
2122 #.      return result | (av == &main_arena ? sYSTRIm (pad, av) : 0);
2123 #. type: Plain text
2124 #: build/C/man3/malloc_trim.3:76
2125 msgid "This function only releases memory in the main arena."
2126 msgstr ""
2127
2128 #. type: Plain text
2129 #: build/C/man3/malloc_trim.3:80
2130 msgid "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
2131 msgstr "B<sbrk>(2), B<malloc>(3), B<mallopt>(3)"
2132
2133 #. type: TH
2134 #: build/C/man3/malloc_usable_size.3:23
2135 #, no-wrap
2136 msgid "MALLOC_USABLE_SIZE"
2137 msgstr "MALLOC_USABLE_SIZE"
2138
2139 #. type: Plain text
2140 #: build/C/man3/malloc_usable_size.3:26
2141 msgid "malloc_usable_size - obtain size of block of memory allocated from heap"
2142 msgstr ""
2143
2144 #. type: Plain text
2145 #: build/C/man3/malloc_usable_size.3:30
2146 msgid "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
2147 msgstr "B<size_t malloc_usable_size (void *>I<ptr>B<);>"
2148
2149 #. type: Plain text
2150 #: build/C/man3/malloc_usable_size.3:38
2151 msgid ""
2152 "The B<malloc_usable_size>()  function returns the number of usable bytes in "
2153 "the block pointed to by I<ptr>, a pointer to a block of memory allocated by "
2154 "B<malloc>(3)  or a related function."
2155 msgstr ""
2156
2157 #. type: Plain text
2158 #: build/C/man3/malloc_usable_size.3:46
2159 msgid ""
2160 "B<malloc_usable_size>()  returns the number of usable bytes in the block of "
2161 "allocated memory pointed to by I<ptr>.  If I<ptr> is NULL, 0 is returned."
2162 msgstr ""
2163
2164 #. type: Plain text
2165 #: build/C/man3/malloc_usable_size.3:58
2166 msgid ""
2167 "The value returned by B<malloc_usable_size>()  may be greater than the "
2168 "requested size of the allocation because of alignment and minimum size "
2169 "constraints.  Although the excess bytes can be overwritten by the "
2170 "application without ill effects, this is not good programming practice: the "
2171 "number of excess bytes in an allocation depends on the underlying "
2172 "implementation."
2173 msgstr ""
2174
2175 #. type: Plain text
2176 #: build/C/man3/malloc_usable_size.3:60
2177 msgid "The main use of this function is for debugging and introspection."
2178 msgstr ""
2179
2180 #. type: Plain text
2181 #: build/C/man3/malloc_usable_size.3:62
2182 msgid "B<malloc>(3)"
2183 msgstr "B<malloc>(3)"
2184
2185 #. type: TH
2186 #: build/C/man3/mallopt.3:24
2187 #, no-wrap
2188 msgid "MALLOPT"
2189 msgstr "MALLOPT"
2190
2191 #. type: TH
2192 #: build/C/man3/mallopt.3:24 build/C/man3/mcheck.3:23 build/C/man3/mtrace.3:23
2193 #, no-wrap
2194 msgid "2012-04-18"
2195 msgstr "2012-04-18"
2196
2197 #. type: Plain text
2198 #: build/C/man3/mallopt.3:27
2199 msgid "mallopt - set memory allocation parameters"
2200 msgstr ""
2201
2202 #. type: Plain text
2203 #: build/C/man3/mallopt.3:31
2204 msgid "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
2205 msgstr "B<int mallopt(int >I<param>B<, int >I<value>B<);>"
2206
2207 #. type: Plain text
2208 #: build/C/man3/mallopt.3:42
2209 msgid ""
2210 "The B<mallopt>()  function adjusts parameters that control the behavior of "
2211 "the memory-allocation functions (see B<malloc>(3)).  The I<param> argument "
2212 "specifies the parameter to be modified, and I<value> specifies the new value "
2213 "for that parameter."
2214 msgstr ""
2215
2216 #. type: Plain text
2217 #: build/C/man3/mallopt.3:45
2218 msgid "The following values can be specified for I<param>:"
2219 msgstr "I<param> には以下の値を指定することができる。"
2220
2221 #. type: TP
2222 #: build/C/man3/mallopt.3:45
2223 #, no-wrap
2224 msgid "B<M_CHECK_ACTION>"
2225 msgstr "B<M_CHECK_ACTION>"
2226
2227 #. type: Plain text
2228 #: build/C/man3/mallopt.3:51
2229 msgid ""
2230 "Setting this parameter controls how glibc responds when various kinds of "
2231 "programming errors are detected (e.g., freeing the same pointer twice).  The "
2232 "3 least significant bits (2, 1, and 0) of the value assigned to this "
2233 "parameter determine the glibc behavior, as follows:"
2234 msgstr ""
2235
2236 #. type: TP
2237 #: build/C/man3/mallopt.3:52
2238 #, no-wrap
2239 msgid "Bit 0"
2240 msgstr "Bit 0"
2241
2242 #. type: Plain text
2243 #: build/C/man3/mallopt.3:62
2244 msgid ""
2245 "If this bit is set, then print a one-line message on I<stderr> that provides "
2246 "details about the error.  The message starts with the string \"***\\ glibc "
2247 "detected\\ ***\", followed by the program name, the name of the memory-"
2248 "allocation function in which the error was detected, a brief description of "
2249 "the error, and the memory address where the error was detected."
2250 msgstr ""
2251
2252 #. type: TP
2253 #: build/C/man3/mallopt.3:62
2254 #, no-wrap
2255 msgid "Bit 1"
2256 msgstr "Bit 1"
2257
2258 #. type: Plain text
2259 #: build/C/man3/mallopt.3:77
2260 msgid ""
2261 "If this bit is set, then, after printing any error message specified by bit "
2262 "0, the program is terminated by calling B<abort>(3).  In glibc versions "
2263 "since 2.4, if bit 0 is also set, then, between printing the error message "
2264 "and aborting, the program also prints a stack trace in the manner of "
2265 "B<backtrace>(3), and prints the process's memory mapping in the style of I</"
2266 "proc/[pid]/maps> (see B<proc>(5))."
2267 msgstr ""
2268
2269 #. type: TP
2270 #: build/C/man3/mallopt.3:77
2271 #, no-wrap
2272 msgid "Bit 2 (since glibc 2.4)"
2273 msgstr "Bit 2 (glibc 2.4 以降)"
2274
2275 #. type: Plain text
2276 #: build/C/man3/mallopt.3:84
2277 msgid ""
2278 "This bit has an effect only if bit 0 is also set.  If this bit is set, then "
2279 "the one-line message describing the error is simplified to contain just the "
2280 "name of the function where the error was detected and the brief description "
2281 "of the error."
2282 msgstr ""
2283
2284 #. type: Plain text
2285 #: build/C/man3/mallopt.3:89
2286 msgid "The remaining bits in I<value> are ignored."
2287 msgstr ""
2288
2289 #. type: Plain text
2290 #: build/C/man3/mallopt.3:93
2291 msgid ""
2292 "Combining the above details, the following numeric values are meaningful for "
2293 "B<M_CHECK_ACTION>:"
2294 msgstr ""
2295
2296 #. type: IP
2297 #: build/C/man3/mallopt.3:94
2298 #, no-wrap
2299 msgid "0"
2300 msgstr ""
2301
2302 #. type: Plain text
2303 #: build/C/man3/mallopt.3:96
2304 msgid "Ignore error conditions; continue execution (with undefined results)."
2305 msgstr ""
2306
2307 #. type: IP
2308 #: build/C/man3/mallopt.3:96
2309 #, no-wrap
2310 msgid "1"
2311 msgstr "1"
2312
2313 #. type: Plain text
2314 #: build/C/man3/mallopt.3:98
2315 msgid "Print a detailed error message and continue execution."
2316 msgstr ""
2317
2318 #. type: IP
2319 #: build/C/man3/mallopt.3:98
2320 #, no-wrap
2321 msgid "2"
2322 msgstr "2"
2323
2324 #. type: Plain text
2325 #: build/C/man3/mallopt.3:100
2326 msgid "Abort the program."
2327 msgstr ""
2328
2329 #. type: IP
2330 #: build/C/man3/mallopt.3:100
2331 #, no-wrap
2332 msgid "3"
2333 msgstr ""
2334
2335 #. type: Plain text
2336 #: build/C/man3/mallopt.3:103
2337 msgid ""
2338 "Print detailed error message, stack trace, and memory mappings, and abort "
2339 "the program."
2340 msgstr ""
2341
2342 #. type: IP
2343 #: build/C/man3/mallopt.3:103
2344 #, no-wrap
2345 msgid "5"
2346 msgstr ""
2347
2348 #. type: Plain text
2349 #: build/C/man3/mallopt.3:105
2350 msgid "Print a simple error message and continue execution."
2351 msgstr ""
2352
2353 #. type: IP
2354 #: build/C/man3/mallopt.3:105
2355 #, no-wrap
2356 msgid "7"
2357 msgstr ""
2358
2359 #. type: Plain text
2360 #: build/C/man3/mallopt.3:108
2361 msgid ""
2362 "Print simple error message, stack trace, and memory mappings, and abort the "
2363 "program."
2364 msgstr ""
2365
2366 #. type: Plain text
2367 #: build/C/man3/mallopt.3:114
2368 msgid ""
2369 "Since glibc 2.3.4, the default value for the B<M_CHECK_ACTION> parameter is "
2370 "3.  In glibc version 2.3.3 and earlier, the default value is 1."
2371 msgstr ""
2372
2373 #. type: Plain text
2374 #: build/C/man3/mallopt.3:119
2375 msgid ""
2376 "Using a nonzero B<M_CHECK_ACTION> value can be useful because otherwise a "
2377 "crash may happen much later, and the true cause of the problem is then very "
2378 "hard to track down."
2379 msgstr ""
2380
2381 #. type: TP
2382 #: build/C/man3/mallopt.3:119
2383 #, no-wrap
2384 msgid "B<M_MMAP_MAX>"
2385 msgstr "B<M_MMAP_MAX>"
2386
2387 #.  The following text adapted from comments in the glibc source:
2388 #. type: Plain text
2389 #: build/C/man3/mallopt.3:129
2390 msgid ""
2391 "This parameter specifies the maximum number of allocation requests that may "
2392 "be simultaneously serviced using B<mmap>(2).  This parameter exists because "
2393 "some systems have a limited number of internal tables for use by B<mmap>(2), "
2394 "and using more than a few of them may degrade performance."
2395 msgstr ""
2396
2397 #. type: Plain text
2398 #: build/C/man3/mallopt.3:136
2399 msgid ""
2400 "The default value is 65,536, a value which has no special significance and "
2401 "which servers only as a safeguard.  Setting this parameter to 0 disables the "
2402 "use of B<mmap>(2)  for servicing large allocation requests."
2403 msgstr ""
2404
2405 #. type: TP
2406 #: build/C/man3/mallopt.3:136
2407 #, no-wrap
2408 msgid "B<M_MMAP_THRESHOLD>"
2409 msgstr "B<M_MMAP_THRESHOLD>"
2410
2411 #. type: Plain text
2412 #: build/C/man3/mallopt.3:145
2413 msgid ""
2414 "For allocations greater than or equal to the limit specified (in bytes) by "
2415 "B<M_MMAP_THRESHOLD> that can't be satisfied from the free list, the memory-"
2416 "allocation functions employ B<mmap>(2)  instead of increasing the program "
2417 "break using B<sbrk>(2)."
2418 msgstr ""
2419
2420 #. type: Plain text
2421 #: build/C/man3/mallopt.3:165
2422 msgid ""
2423 "Allocating memory using B<mmap>(2)  has the significant advantage that the "
2424 "allocated memory blocks can always be independently released back to the "
2425 "system.  (By contrast, the heap can be trimmed only if memory is freed at "
2426 "the top end.)  On the other hand, there are some disadvantages to the use of "
2427 "B<mmap>(2): deallocated space is not placed on the free list for reuse by "
2428 "later allocations; memory may be wasted because B<mmap>(2)  allocations must "
2429 "be page-aligned; and the kernel must perform the expensive task of zeroing "
2430 "out memory allocated via B<mmap>(2).  Balancing these factors leads to a "
2431 "default setting of 128*1024 for the B<M_MMAP_THRESHOLD> parameter."
2432 msgstr ""
2433
2434 #. type: Plain text
2435 #: build/C/man3/mallopt.3:172
2436 msgid ""
2437 "The lower limit for this parameter is 0.  The upper limit is "
2438 "B<DEFAULT_MMAP_THRESHOLD_MAX>: 512*1024 on 32-bit systems or "
2439 "I<4*1024*1024*sizeof(long)> on 64-bit systems."
2440 msgstr ""
2441
2442 #. type: Plain text
2443 #: build/C/man3/mallopt.3:190
2444 msgid ""
2445 "I<Note:> Nowadays, glibc uses a dynamic mmap threshold by default.  The "
2446 "initial value of the threshold is 128*1024, but when blocks larger than the "
2447 "current threshold and less than or equal to B<DEFAULT_MMAP_THRESHOLD_MAX> "
2448 "are freed, the threshold is adjusted upwards to the size of the freed "
2449 "block.  When dynamic mmap thresholding is in effect, the threshold for "
2450 "trimming the heap is also dynamically adjusted to be twice the dynamic mmap "
2451 "threshold.  Dynamic adjustment of the mmap threshold is disabled if any of "
2452 "the B<M_TRIM_THRESHOLD>, B<M_TOP_PAD>, B<M_MMAP_THRESHOLD>, or B<M_MMAP_MAX> "
2453 "parameters is set."
2454 msgstr ""
2455
2456 #. type: TP
2457 #: build/C/man3/mallopt.3:190
2458 #, no-wrap
2459 msgid "B<M_MXFAST> (since glibc 2.3)"
2460 msgstr "B<M_MXFAST> (glibc 2.3 以降)"
2461
2462 #.  The following text adapted from comments in the glibc sources:
2463 #. type: Plain text
2464 #: build/C/man3/mallopt.3:210
2465 msgid ""
2466 "Set the upper limit for memory allocation requests that are satisfied using "
2467 "\"fastbins\".  (The measurement unit for this parameter is bytes.)  Fastbins "
2468 "are storage areas that hold deallocated blocks of memory of the same size "
2469 "without merging adjacent free blocks.  Subsequent reallocation of blocks of "
2470 "the same size can be handled very quickly by allocating from the fastbin, "
2471 "although memory fragmentation and the overall memory footprint of the "
2472 "program can increase.  The default value for this parameter is I<64*sizeof"
2473 "(size_t)/4> (i.e., 64 on 32-bit architectures).  The range for this "
2474 "parameter is 0 to I<80*sizeof(size_t)/4>.  Setting B<M_MXFAST> to 0 disables "
2475 "the use of fastbins."
2476 msgstr ""
2477
2478 #. type: TP
2479 #: build/C/man3/mallopt.3:210
2480 #, no-wrap
2481 msgid "B<M_PERTURB> (since glibc 2.4)"
2482 msgstr "B<M_PERTURB> (glibc 2.4 以降)"
2483
2484 #. type: Plain text
2485 #: build/C/man3/mallopt.3:225
2486 msgid ""
2487 "If this parameter is set to a nonzero value, then bytes of allocated memory "
2488 "(other than allocations via B<calloc>(3))  are initialized to the complement "
2489 "of the value in the least significant byte of I<value>, and when allocated "
2490 "memory is released using B<free>(3), the freed bytes are set to the least "
2491 "significant byte of I<value>.  This can be useful for detecting errors where "
2492 "programs incorrectly rely on allocated memory being initialized to zero, or "
2493 "reuse values in memory that has already been freed."
2494 msgstr ""
2495
2496 #. type: TP
2497 #: build/C/man3/mallopt.3:225
2498 #, no-wrap
2499 msgid "B<M_TOP_PAD>"
2500 msgstr ""
2501
2502 #. type: Plain text
2503 #: build/C/man3/mallopt.3:232
2504 msgid ""
2505 "This parameter defines the amount of padding to employ when calling B<sbrk>"
2506 "(2)  to modify the program break.  (The measurement unit for this parameter "
2507 "is bytes.)  This parameter has an effect in the following circumstances:"
2508 msgstr ""
2509
2510 #. type: Plain text
2511 #: build/C/man3/mallopt.3:239
2512 msgid ""
2513 "When the program break is increased, then B<M_TOP_PAD> bytes are added to "
2514 "the B<sbrk>(2)  request."
2515 msgstr ""
2516
2517 #. type: Plain text
2518 #: build/C/man3/mallopt.3:245
2519 msgid ""
2520 "When the heap is trimmed as a consequence of calling B<free>(3)  (see the "
2521 "discussion of B<M_TRIM_THRESHOLD>)  this much free space is preserved at the "
2522 "top of the heap."
2523 msgstr ""
2524
2525 #. type: Plain text
2526 #: build/C/man3/mallopt.3:249
2527 msgid ""
2528 "In either case, the amount of padding is always rounded to a system page "
2529 "boundary."
2530 msgstr ""
2531
2532 #. type: Plain text
2533 #: build/C/man3/mallopt.3:256
2534 msgid ""
2535 "Modifying B<M_TOP_PAD> is a trade-off between increasing the number of "
2536 "system calls (when the parameter is set low)  and wasting unused memory at "
2537 "the top of the heap (when the parameter is set high)."
2538 msgstr ""
2539
2540 #.  DEFAULT_TOP_PAD in glibc source
2541 #. type: Plain text
2542 #: build/C/man3/mallopt.3:259
2543 msgid "The default value for this parameter is 128*1024."
2544 msgstr ""
2545
2546 #. type: TP
2547 #: build/C/man3/mallopt.3:259
2548 #, no-wrap
2549 msgid "B<M_TRIM_THRESHOLD>"
2550 msgstr ""
2551
2552 #. type: Plain text
2553 #: build/C/man3/mallopt.3:275
2554 msgid ""
2555 "When the amount of contiguous free memory at the top of the heap grows "
2556 "sufficiently large, B<free>(3)  employs B<sbrk>(2)  to release this memory "
2557 "back to the system.  (This can be useful in programs that continue to "
2558 "execute for a long period after freeing a significant amount of memory.)  "
2559 "The B<M_TRIM_THRESHOLD> parameter specifies the minimum size (in bytes) that "
2560 "this block of memory must reach before B<sbrk>(2)  is used to trim the heap."
2561 msgstr ""
2562
2563 #. type: Plain text
2564 #: build/C/man3/mallopt.3:280
2565 msgid ""
2566 "The default value for this parameter is 128*1024.  Setting "
2567 "B<M_TRIM_THRESHOLD> to -1 disables trimming completely."
2568 msgstr ""
2569
2570 #
2571 #
2572 #
2573 #.  FIXME Do the arena parameters need to be documented?
2574 #.  .TP
2575 #.  .BR M_ARENA_TEST " (since glibc 2.10)"
2576 #.  .TP
2577 #.  .BR M_ARENA_MAX " (since glibc 2.10)"
2578 #.  Environment variables
2579 #.      MALLOC_ARENA_MAX_
2580 #.      MALLOC_ARENA_TEST_
2581 #.  http://udrepper.livejournal.com/20948.html describes some details
2582 #.      of the MALLOC_ARENA_* environment variables.
2583 #.  These macros aren't enabled in production releases until 2.15?
2584 #.  (see glibc malloc/Makefile)
2585 #. type: Plain text
2586 #: build/C/man3/mallopt.3:303
2587 msgid ""
2588 "Modifying B<M_TRIM_THRESHOLD> is a trade-off between increasing the number "
2589 "of system calls (when the parameter is set low)  and wasting unused memory "
2590 "at the top of the heap (when the parameter is set high)."
2591 msgstr ""
2592
2593 #. type: SS
2594 #: build/C/man3/mallopt.3:303
2595 #, no-wrap
2596 msgid "Environment Variables"
2597 msgstr ""
2598
2599 #. type: Plain text
2600 #: build/C/man3/mallopt.3:318
2601 msgid ""
2602 "A number of environment variables can be defined to modify some of the same "
2603 "parameters as are controlled by B<mallopt>().  Using these variables has the "
2604 "advantage that the source code of the program need not be changed.  To be "
2605 "effective, these variables must be defined before the first call to a memory-"
2606 "allocation function.  (If the same parameters are adjusted via B<mallopt>()  "
2607 "then the B<mallopt>()  settings take precedence.)  For security reasons, "
2608 "these variables are ignored in set-user-ID and set-group-ID programs."
2609 msgstr ""
2610
2611 #. type: Plain text
2612 #: build/C/man3/mallopt.3:321
2613 msgid ""
2614 "The environment variables are as follows (note the trailing underscore at "
2615 "the end of the name of each variable):"
2616 msgstr ""
2617
2618 #. type: TP
2619 #: build/C/man3/mallopt.3:321
2620 #, no-wrap
2621 msgid "B<MALLOC_CHECK_>"
2622 msgstr "B<MALLOC_CHECK_>"
2623
2624 #.  On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower
2625 #.  when MALLOC_CHECK_ was set.
2626 #. type: Plain text
2627 #: build/C/man3/mallopt.3:338
2628 msgid ""
2629 "This environment variable controls the same parameter as B<mallopt>()  "
2630 "B<M_CHECK_ACTION>.  If this variable is set to a nonzero value, then a "
2631 "special implementation of the memory-allocation functions is used.  (This is "
2632 "accomplished using the B<malloc_hook>(3)  feature.)  This implementation "
2633 "performs additional error checking, but is slower than the standard set of "
2634 "memory-allocation functions.  (This implementation does not detect all "
2635 "possible errors; memory leaks can still occur.)"
2636 msgstr ""
2637
2638 #. type: Plain text
2639 #: build/C/man3/mallopt.3:343
2640 msgid ""
2641 "The value assigned to this environment variable should be a single digit, "
2642 "whose meaning is as described for B<M_CHECK_ACTION>.  Any characters beyond "
2643 "the initial digit are ignored."
2644 msgstr ""
2645
2646 #. type: Plain text
2647 #: build/C/man3/mallopt.3:352
2648 msgid ""
2649 "For security reasons, the effect of B<MALLOC_CHECK_> is disabled by default "
2650 "for set-user-ID and set-group-ID programs.  However, if the file I</etc/suid-"
2651 "debug> exists (the content of the file is irrelevant), then B<MALLOC_CHECK_> "
2652 "also has an effect for set-user-ID and set-group-ID programs."
2653 msgstr ""
2654
2655 #. type: TP
2656 #: build/C/man3/mallopt.3:352
2657 #, no-wrap
2658 msgid "B<MALLOC_MMAP_MAX_>"
2659 msgstr ""
2660
2661 #. type: Plain text
2662 #: build/C/man3/mallopt.3:357
2663 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_MAX>."
2664 msgstr ""
2665
2666 #. type: TP
2667 #: build/C/man3/mallopt.3:357
2668 #, no-wrap
2669 msgid "B<MALLOC_MMAP_THRESHOLD_>"
2670 msgstr ""
2671
2672 #. type: Plain text
2673 #: build/C/man3/mallopt.3:362
2674 msgid "Controls the same parameter as B<mallopt>()  B<M_MMAP_THRESHOLD>."
2675 msgstr ""
2676
2677 #. type: TP
2678 #: build/C/man3/mallopt.3:362
2679 #, no-wrap
2680 msgid "B<MALLOC_PERTURB_>"
2681 msgstr ""
2682
2683 #. type: Plain text
2684 #: build/C/man3/mallopt.3:367
2685 msgid "Controls the same parameter as B<mallopt>()  B<M_PERTURB>."
2686 msgstr ""
2687
2688 #. type: TP
2689 #: build/C/man3/mallopt.3:367
2690 #, no-wrap
2691 msgid "B<MALLOC_TRIM_THRESHOLD_>"
2692 msgstr ""
2693
2694 #. type: Plain text
2695 #: build/C/man3/mallopt.3:372
2696 msgid "Controls the same parameter as B<mallopt>()  B<M_TRIM_THRESHOLD>."
2697 msgstr ""
2698
2699 #. type: TP
2700 #: build/C/man3/mallopt.3:372
2701 #, no-wrap
2702 msgid "B<MALLOC_TOP_PAD_>"
2703 msgstr "B<MALLOC_TOP_PAD_>"
2704
2705 #. type: Plain text
2706 #: build/C/man3/mallopt.3:377
2707 msgid "Controls the same parameter as B<mallopt>()  B<M_TOP_PAD>."
2708 msgstr ""
2709
2710 #. type: Plain text
2711 #: build/C/man3/mallopt.3:382
2712 msgid "On success, B<mallopt>()  returns 1.  On error, it returns 0."
2713 msgstr "B<mallopt>()  は成功すると 1 を返す。エラーの場合は 0 を返す。"
2714
2715 #.  .SH VERSIONS
2716 #.  Available already in glibc 2.0, possibly earlier
2717 #. type: Plain text
2718 #: build/C/man3/mallopt.3:390
2719 msgid "On error, I<errno> is I<not> set."
2720 msgstr "エラーの場合、I<errno> は設定I<されない>。"
2721
2722 #.  .SH NOTES
2723 #. type: Plain text
2724 #: build/C/man3/mallopt.3:404
2725 msgid ""
2726 "This function is not specified by POSIX or the C standards.  A similar "
2727 "function exists on many System V derivatives, but the range of values for "
2728 "I<param> varies across systems.  The SVID defined options B<M_MXFAST>, "
2729 "B<M_NLBLKS>, B<M_GRAIN>, and B<M_KEEP>, but only the first of these is "
2730 "implemented in glibc."
2731 msgstr ""
2732
2733 #. type: Plain text
2734 #: build/C/man3/mallopt.3:408
2735 msgid "Specifying an invalid value for I<param> does not generate an error."
2736 msgstr ""
2737
2738 #.  FIXME This looks buggy:
2739 #.  setting the M_MXFAST limit rounds up:    (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
2740 #.  malloc requests are rounded up:
2741 #.     (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
2742 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
2743 #. type: Plain text
2744 #: build/C/man3/mallopt.3:416
2745 msgid ""
2746 "A calculation error within the glibc implementation means that a call of the "
2747 "form:"
2748 msgstr ""
2749
2750 #. type: Plain text
2751 #: build/C/man3/mallopt.3:419
2752 #, no-wrap
2753 msgid "    mallopt(M_MXFAST, n)\n"
2754 msgstr ""
2755
2756 #.  Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
2757 #. type: Plain text
2758 #: build/C/man3/mallopt.3:431
2759 msgid ""
2760 "does not result in fastbins being employed for all allocations of size up to "
2761 "I<n>.  To ensure desired results, I<n> should be rounded up to the next "
2762 "multiple greater than or equal to I<(2k+1)*sizeof(size_t)>, where I<k> is an "
2763 "integer."
2764 msgstr ""
2765
2766 #.  FIXME MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_
2767 #.  do have an effect for set-user-ID programs (but not
2768 #.  set-group-ID programs).
2769 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12155
2770 #. type: Plain text
2771 #: build/C/man3/mallopt.3:443
2772 msgid ""
2773 "The B<MALLOC_MMAP_THRESHOLD_> and B<MALLOC_MMAP_MAX_> variables are I<not> "
2774 "ignored in set-group-ID programs."
2775 msgstr ""
2776
2777 #.  FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
2778 #. type: Plain text
2779 #: build/C/man3/mallopt.3:464
2780 msgid ""
2781 "If B<mallopt>()  is used to set B<M_PERTURB>, then, as expected, the bytes "
2782 "of allocated memory are initialized to the complement of the byte in "
2783 "I<value>, and when that memory is freed, the bytes of the region are "
2784 "initialized to the byte specified in I<value>.  However, there is an off-by-"
2785 "I<sizeof(size_t)> error in the implementation: instead of initializing "
2786 "precisely the block of memory being freed by the call I<free(p)>, the block "
2787 "starting at I<p+sizeof(size_t)> is initialized."
2788 msgstr ""
2789
2790 #. type: Plain text
2791 #: build/C/man3/mallopt.3:473
2792 msgid ""
2793 "The program below demonstrates the use of B<M_CHECK_ACTION>.  If the program "
2794 "is supplied with an (integer) command-line argument, then that argument is "
2795 "used to set the B<M_CHECK_ACTION> parameter.  The program then allocates a "
2796 "block of memory, and frees it twice (an error)."
2797 msgstr ""
2798
2799 #. type: Plain text
2800 #: build/C/man3/mallopt.3:477
2801 msgid ""
2802 "The following shell session shows what happens when we run this program "
2803 "under glibc, with the default value for B<M_CHECK_ACTION>:"
2804 msgstr ""
2805
2806 #. type: Plain text
2807 #: build/C/man3/mallopt.3:496
2808 #, no-wrap
2809 msgid ""
2810 "$ B<./a.out>\n"
2811 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***\n"
2812 "======= Backtrace: =========\n"
2813 "/lib/libc.so.6(+0x6c501)[0x523501]\n"
2814 "/lib/libc.so.6(+0x6dd70)[0x524d70]\n"
2815 "/lib/libc.so.6(cfree+0x6d)[0x527e5d]\n"
2816 "\\&./a.out[0x80485db]\n"
2817 "/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]\n"
2818 "\\&./a.out[0x8048471]\n"
2819 "======= Memory map: ========\n"
2820 "001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1\n"
2821 "001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1\n"
2822 "[some lines omitted]\n"
2823 "b7814000-b7817000 rw-p 00000000 00:00 0\n"
2824 "bff53000-bff74000 rw-p 00000000 00:00 0          [stack]\n"
2825 "Aborted (core dumped)\n"
2826 msgstr ""
2827
2828 #. type: Plain text
2829 #: build/C/man3/mallopt.3:501
2830 msgid ""
2831 "The following runs show the results when employing other values for "
2832 "B<M_CHECK_ACTION>:"
2833 msgstr ""
2834
2835 #. type: Plain text
2836 #: build/C/man3/mallopt.3:514
2837 #, no-wrap
2838 msgid ""
2839 "$ B<./a.out 1>             # Diagnose error and continue\n"
2840 "main(): returned from first free() call\n"
2841 "*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***\n"
2842 "main(): returned from second free() call\n"
2843 "$ B<./a.out 2>             # Abort without error message\n"
2844 "main(): returned from first free() call\n"
2845 "Aborted (core dumped)\n"
2846 "$ B<./a.out 0>             # Ignore error and continue\n"
2847 "main(): returned from first free() call\n"
2848 "main(): returned from second free() call\n"
2849 msgstr ""
2850
2851 #. type: Plain text
2852 #: build/C/man3/mallopt.3:520
2853 msgid ""
2854 "The next run shows how to set the same parameter using the B<MALLOC_CHECK_> "
2855 "environment variable:"
2856 msgstr ""
2857
2858 #. type: Plain text
2859 #: build/C/man3/mallopt.3:527
2860 #, no-wrap
2861 msgid ""
2862 "$ B<MALLOC_CHECK_=1 ./a.out>\n"
2863 "main(): returned from first free() call\n"
2864 "*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***\n"
2865 "main(): returned from second free() call\n"
2866 msgstr ""
2867
2868 #. type: SS
2869 #: build/C/man3/mallopt.3:529 build/C/man3/mcheck.3:176
2870 #: build/C/man2/mprotect.2:159
2871 #, no-wrap
2872 msgid "Program source"
2873 msgstr "プログラムのソース"
2874
2875 #. type: Plain text
2876 #: build/C/man3/mallopt.3:535
2877 #, no-wrap
2878 msgid ""
2879 "#include E<lt>malloc.hE<gt>\n"
2880 "#include E<lt>stdio.hE<gt>\n"
2881 "#include E<lt>stdlib.hE<gt>\n"
2882 msgstr ""
2883 "#include E<lt>malloc.hE<gt>\n"
2884 "#include E<lt>stdio.hE<gt>\n"
2885 "#include E<lt>stdlib.hE<gt>\n"
2886
2887 #. type: Plain text
2888 #: build/C/man3/mallopt.3:540 build/C/man3/mcheck.3:187
2889 #, no-wrap
2890 msgid ""
2891 "int\n"
2892 "main(int argc, char *argv[])\n"
2893 "{\n"
2894 "    char *p;\n"
2895 msgstr ""
2896 "int\n"
2897 "main(int argc, char *argv[])\n"
2898 "{\n"
2899 "    char *p;\n"
2900
2901 #. type: Plain text
2902 #: build/C/man3/mallopt.3:547
2903 #, no-wrap
2904 msgid ""
2905 "    if (argc E<gt> 1) {\n"
2906 "        if (argc != 2) {\n"
2907 "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2908 "            exit(EXIT_FAILURE);\n"
2909 "        }\n"
2910 "    }\n"
2911 msgstr ""
2912 "    if (argc E<gt> 1) {\n"
2913 "        if (argc != 2) {\n"
2914 "            fprintf(stderr, \"%s E<lt>M_CHECK_ACTION-valueE<gt>\\en\", argv[0]);\n"
2915 "            exit(EXIT_FAILURE);\n"
2916 "        }\n"
2917 "    }\n"
2918
2919 #. type: Plain text
2920 #: build/C/man3/mallopt.3:552
2921 #, no-wrap
2922 msgid ""
2923 "    if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2924 "        fprintf(stderr, \"mallopt() failed\");\n"
2925 "        exit(EXIT_FAILURE);\n"
2926 "    }\n"
2927 msgstr ""
2928 "    if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {\n"
2929 "        fprintf(stderr, \"mallopt() failed\");\n"
2930 "        exit(EXIT_FAILURE);\n"
2931 "    }\n"
2932
2933 #. type: Plain text
2934 #: build/C/man3/mallopt.3:558
2935 #, no-wrap
2936 msgid ""
2937 "    p = malloc(1000);\n"
2938 "    if (p == NULL) {\n"
2939 "        fprintf(stderr, \"malloc() failed\");\n"
2940 "        exit(EXIT_FAILURE);\n"
2941 "    }\n"
2942 msgstr ""
2943 "    p = malloc(1000);\n"
2944 "    if (p == NULL) {\n"
2945 "        fprintf(stderr, \"malloc() failed\");\n"
2946 "        exit(EXIT_FAILURE);\n"
2947 "    }\n"
2948
2949 #. type: Plain text
2950 #: build/C/man3/mallopt.3:561
2951 #, no-wrap
2952 msgid ""
2953 "    free(p);\n"
2954 "    printf(\"main(): returned from first free() call\\en\");\n"
2955 msgstr ""
2956 "    free(p);\n"
2957 "    printf(\"main(): returned from first free() call\\en\");\n"
2958
2959 #. type: Plain text
2960 #: build/C/man3/mallopt.3:564
2961 #, no-wrap
2962 msgid ""
2963 "    free(p);\n"
2964 "    printf(\"main(): returned from second free() call\\en\");\n"
2965 msgstr ""
2966 "    free(p);\n"
2967 "    printf(\"main(): returned from second free() call\\en\");\n"
2968
2969 #. type: Plain text
2970 #: build/C/man3/mallopt.3:567 build/C/man3/mcheck.3:203
2971 #: build/C/man2/mmap.2:652
2972 #, no-wrap
2973 msgid ""
2974 "    exit(EXIT_SUCCESS);\n"
2975 "}\n"
2976 msgstr ""
2977 "    exit(EXIT_SUCCESS);\n"
2978 "}\n"
2979
2980 #. type: Plain text
2981 #: build/C/man3/mallopt.3:580
2982 msgid ""
2983 "B<mmap>(2)  B<sbrk>(2), B<mallinfo>(3), B<malloc>(3), B<malloc_hook>(3), "
2984 "B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3), B<posix_memalign>(3)"
2985 msgstr ""
2986 "B<mmap>(2) B<sbrk>(2), B<mallinfo>(3), B<malloc>(3),\n"
2987 "B<malloc_hook>(3), B<malloc_trim>(3), B<mcheck>(3), B<mtrace>(3),\n"
2988 "B<posix_memalign>(3)"
2989
2990 #. type: TH
2991 #: build/C/man3/mcheck.3:23
2992 #, no-wrap
2993 msgid "MCHECK"
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: build/C/man3/mcheck.3:26
2998 msgid ""
2999 "mcheck, mcheck_check_all, mcheck_pedantic, mprobe - heap consistency checking"
3000 msgstr ""
3001
3002 #. type: Plain text
3003 #: build/C/man3/mcheck.3:29
3004 #, no-wrap
3005 msgid "B<#include E<lt>mcheck.hE<gt>>\n"
3006 msgstr "B<#include E<lt>mcheck.hE<gt>>\n"
3007
3008 #. type: Plain text
3009 #: build/C/man3/mcheck.3:31
3010 #, no-wrap
3011 msgid "B<int mcheck(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
3012 msgstr ""
3013
3014 #. type: Plain text
3015 #: build/C/man3/mcheck.3:33
3016 #, no-wrap
3017 msgid "B<int mcheck_pedantic(void (*>I<abortfunc>B<)(enum mcheck_status >I<mstatus>B<));>\n"
3018 msgstr ""
3019
3020 #. type: Plain text
3021 #: build/C/man3/mcheck.3:35
3022 #, no-wrap
3023 msgid "B<void mcheck_check_all(void);>\n"
3024 msgstr "B<void mcheck_check_all(void);>\n"
3025
3026 #. type: Plain text
3027 #: build/C/man3/mcheck.3:37
3028 #, no-wrap
3029 msgid "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
3030 msgstr "B<enum mcheck_status mprobe(void *>I<ptr>B<);>\n"
3031
3032 #. type: Plain text
3033 #: build/C/man3/mcheck.3:50
3034 msgid ""
3035 "The B<mcheck>()  function installs a set of debugging hooks for the B<malloc>"
3036 "(3)  family of memory-allocation functions.  These hooks cause certain "
3037 "consistency checks to be performed on the state of the heap.  The checks can "
3038 "detect application errors such as freeing a block of memory more than once "
3039 "or corrupting the bookkeeping data structures that immediately precede a "
3040 "block of allocated memory."
3041 msgstr ""
3042
3043 #. type: Plain text
3044 #: build/C/man3/mcheck.3:62
3045 msgid ""
3046 "To be effective, the B<mcheck>()  function must be called before the first "
3047 "call to B<malloc>(3)  or a related function.  In cases where this is "
3048 "difficult to ensure, linking the program with I<-mcheck> inserts an implicit "
3049 "call to B<mcheck>()  (with a NULL argument)  before the first call to a "
3050 "memory-allocation function."
3051 msgstr ""
3052
3053 #. type: Plain text
3054 #: build/C/man3/mcheck.3:70
3055 msgid ""
3056 "The B<mcheck_pedantic>()  function is similar to B<mcheck>(), but performs "
3057 "checks on all allocated blocks whenever one of the memory-allocation "
3058 "functions is called.  This can be very slow!"
3059 msgstr ""
3060
3061 #. type: Plain text
3062 #: build/C/man3/mcheck.3:77
3063 msgid ""
3064 "The B<mcheck_check_all>()  function causes an immediate check on all "
3065 "allocated blocks.  This call is only effective if B<mcheck>()  is called "
3066 "beforehand."
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: build/C/man3/mcheck.3:90
3071 msgid ""
3072 "If the system detects an inconsistency in the heap, the caller-supplied "
3073 "function pointed to by I<abortfunc> is invoked with a single argument "
3074 "argument, I<mstatus>, that indicates what type of inconsistency was "
3075 "detected.  If I<abortfunc> is NULL, a default function prints an error "
3076 "message on I<stderr> and calls B<abort>(3)."
3077 msgstr ""
3078
3079 #. type: Plain text
3080 #: build/C/man3/mcheck.3:102
3081 msgid ""
3082 "The B<mprobe>()  function performs a consistency check on the block of "
3083 "allocated memory pointed to by I<ptr>.  The B<mcheck>()  function should be "
3084 "called beforehand (otherwise B<mprobe>()  returns B<MCHECK_DISABLED>)."
3085 msgstr ""
3086
3087 #. type: Plain text
3088 #: build/C/man3/mcheck.3:110
3089 msgid ""
3090 "The following list describes the values returned by B<mprobe>()  or passed "
3091 "as the I<mstatus> argument when I<abortfunc> is invoked:"
3092 msgstr ""
3093
3094 #. type: TP
3095 #: build/C/man3/mcheck.3:110
3096 #, no-wrap
3097 msgid "B<MCHECK_DISABLED> (B<mprobe>() only)"
3098 msgstr ""
3099
3100 #. type: Plain text
3101 #: build/C/man3/mcheck.3:115
3102 msgid ""
3103 "B<mcheck>()  was not called before the first memory allocation function was "
3104 "called.  Consistency checking is not possible."
3105 msgstr ""
3106
3107 #. type: TP
3108 #: build/C/man3/mcheck.3:115
3109 #, no-wrap
3110 msgid "B<MCHECK_OK> (B<mprobe>() only)"
3111 msgstr ""
3112
3113 #. type: Plain text
3114 #: build/C/man3/mcheck.3:118
3115 msgid "No inconsistency detected."
3116 msgstr ""
3117
3118 #. type: TP
3119 #: build/C/man3/mcheck.3:118
3120 #, no-wrap
3121 msgid "B<MCHECK_HEAD>"
3122 msgstr "B<MCHECK_HEAD>"
3123
3124 #. type: Plain text
3125 #: build/C/man3/mcheck.3:121
3126 msgid "Memory preceding an allocated block was clobbered."
3127 msgstr ""
3128
3129 #. type: TP
3130 #: build/C/man3/mcheck.3:121
3131 #, no-wrap
3132 msgid "B<MCHECK_TAIL>"
3133 msgstr "B<MCHECK_TAIL>"
3134
3135 #. type: Plain text
3136 #: build/C/man3/mcheck.3:124
3137 msgid "Memory following an allocated block was clobbered."
3138 msgstr ""
3139
3140 #. type: TP
3141 #: build/C/man3/mcheck.3:124
3142 #, no-wrap
3143 msgid "B<MCHECK_FREE>"
3144 msgstr "B<MCHECK_FREE>"
3145
3146 #. type: Plain text
3147 #: build/C/man3/mcheck.3:128
3148 msgid "A block of memory was freed twice."
3149 msgstr ""
3150
3151 #. type: Plain text
3152 #: build/C/man3/mcheck.3:133
3153 msgid ""
3154 "B<mcheck>()  and B<mcheck_pedantic>()  return 0 on success, or -1 on error."
3155 msgstr ""
3156
3157 #. type: Plain text
3158 #: build/C/man3/mcheck.3:144
3159 msgid ""
3160 "The B<mcheck_pedantic>()  and B<mcheck_check_all>()  functions are available "
3161 "since glibc 2.2.  The B<mcheck()> and B<mprobe()> functions are present "
3162 "since at least glibc 2.0"
3163 msgstr ""
3164
3165 #.  But is MALLOC_CHECK_ slower?
3166 #. type: Plain text
3167 #: build/C/man3/mcheck.3:158
3168 msgid ""
3169 "Linking a program with I<-lmcheck> and using the B<MALLOC_CHECK_> "
3170 "environment variable (described in B<mallopt>(3))  cause the same kinds of "
3171 "errors to be detected.  But, using B<MALLOC_CHECK_> does not require the "
3172 "application to be relinked."
3173 msgstr ""
3174
3175 #. type: Plain text
3176 #: build/C/man3/mcheck.3:165
3177 msgid ""
3178 "The program below calls B<mcheck>()  with a NULL argument and then frees the "
3179 "same block of memory twice.  The following shell session demonstrates what "
3180 "happens when running the program:"
3181 msgstr ""
3182
3183 #. type: Plain text
3184 #: build/C/man3/mcheck.3:170
3185 #, no-wrap
3186 msgid ""
3187 "$B< ./a.out>\n"
3188 "About to free\n"
3189 msgstr ""
3190
3191 #. type: Plain text
3192 #: build/C/man3/mcheck.3:174
3193 #, no-wrap
3194 msgid ""
3195 "About to free a second time\n"
3196 "block freed twice\n"
3197 "Aborted (core dumped)\n"
3198 msgstr ""
3199
3200 #. type: Plain text
3201 #: build/C/man3/mcheck.3:182
3202 #, no-wrap
3203 msgid ""
3204 "#include E<lt>stdlib.hE<gt>\n"
3205 "#include E<lt>stdio.hE<gt>\n"
3206 "#include E<lt>mcheck.hE<gt>\n"
3207 msgstr ""
3208 "#include E<lt>stdlib.hE<gt>\n"
3209 "#include E<lt>stdio.hE<gt>\n"
3210 "#include E<lt>mcheck.hE<gt>\n"
3211
3212 #. type: Plain text
3213 #: build/C/man3/mcheck.3:190
3214 #, no-wrap
3215 msgid ""
3216 "    if (mcheck(NULL) != 0) {\n"
3217 "        fprintf(stderr, \"mcheck() failed\\en\");\n"
3218 msgstr ""
3219
3220 #. type: Plain text
3221 #: build/C/man3/mcheck.3:193
3222 #, no-wrap
3223 msgid ""
3224 "        exit(EXIT_FAILURE);\n"
3225 "    }\n"
3226 msgstr ""
3227 "        exit(EXIT_FAILURE);\n"
3228 "    }\n"
3229
3230 #. type: Plain text
3231 #: build/C/man3/mcheck.3:195
3232 #, no-wrap
3233 msgid "    p = malloc(1000);\n"
3234 msgstr "    p = malloc(1000);\n"
3235
3236 #. type: Plain text
3237 #: build/C/man3/mcheck.3:200
3238 #, no-wrap
3239 msgid ""
3240 "    fprintf(stderr, \"About to free\\en\");\n"
3241 "    free(p);\n"
3242 "    fprintf(stderr, \"\\enAbout to free a second time\\en\");\n"
3243 "    free(p);\n"
3244 msgstr ""
3245
3246 #.  FIXME add SEE ALSO pointer from malloc(3) to here
3247 #.  FIXME add SEE ALSO pointer from mallopt(3) to here
3248 #.  FIXME add SEE ALSO pointer from mtrace(3) to here
3249 #. type: Plain text
3250 #: build/C/man3/mcheck.3:211
3251 msgid "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
3252 msgstr "B<malloc>(3), B<mallopt>(3), B<mtrace>(3)"
3253
3254 #. type: TH
3255 #: build/C/man2/mlock.2:27
3256 #, no-wrap
3257 msgid "MLOCK"
3258 msgstr "MLOCK"
3259
3260 #. type: TH
3261 #: build/C/man2/mlock.2:27
3262 #, no-wrap
3263 msgid "2011-09-14"
3264 msgstr "2011-09-14"
3265
3266 #. type: Plain text
3267 #: build/C/man2/mlock.2:30
3268 msgid "mlock, munlock, mlockall, munlockall - lock and unlock memory"
3269 msgstr "mlock - メモリのロックとロック解除を行う"
3270
3271 #. type: Plain text
3272 #: build/C/man2/mlock.2:33 build/C/man2/mmap.2:46 build/C/man2/mmap2.2:35
3273 #: build/C/man2/mprotect.2:38 build/C/man2/mremap.2:39
3274 #, no-wrap
3275 msgid "B<#include E<lt>sys/mman.hE<gt>>\n"
3276 msgstr "B<#include E<lt>sys/mman.hE<gt>>\n"
3277
3278 #. type: Plain text
3279 #: build/C/man2/mlock.2:36
3280 #, no-wrap
3281 msgid ""
3282 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3283 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3284 msgstr ""
3285 "B<int mlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3286 "B<int munlock(const void *>I<addr>B<, size_t >I<len>B<);>\n"
3287
3288 #. type: Plain text
3289 #: build/C/man2/mlock.2:39
3290 #, no-wrap
3291 msgid ""
3292 "B<int mlockall(int >I<flags>B<);>\n"
3293 "B<int munlockall(void);>\n"
3294 msgstr ""
3295 "B<int mlockall(int >I<flags>B<);>\n"
3296 "B<int munlockall(void);>\n"
3297
3298 #. type: Plain text
3299 #: build/C/man2/mlock.2:55
3300 msgid ""
3301 "B<mlock>()  and B<mlockall>()  respectively lock part or all of the calling "
3302 "process's virtual address space into RAM, preventing that memory from being "
3303 "paged to the swap area.  B<munlock>()  and B<munlockall>()  perform the "
3304 "converse operation, respectively unlocking part or all of the calling "
3305 "process's virtual address space, so that pages in the specified virtual "
3306 "address range may once more to be swapped out if required by the kernel "
3307 "memory manager.  Memory locking and unlocking are performed in units of "
3308 "whole pages."
3309 msgstr ""
3310 "B<mlock>()  と B<mlockall>()  はそれぞれ、呼び出し元プロセスの仮想アドレス空"
3311 "間の一部または全部を RAM 上にロックし、メモリがスワップエリアにページングされ"
3312 "るのを防ぐ。 B<munlock>()  と B<munlockall>()  は逆の操作で、それぞれ呼び出し"
3313 "元プロセスの仮想アドレス空間の一部または全部を ロック解除する。つまり、指定さ"
3314 "れた仮想アドレス範囲のページは カーネルメモリマネージャーから要求されればス"
3315 "ワップアウトするようになる。 メモリのロックとロック解除はページ単位で行われ"
3316 "る。"
3317
3318 #. type: SS
3319 #: build/C/man2/mlock.2:55
3320 #, no-wrap
3321 msgid "mlock() and munlock()"
3322 msgstr "mlock() と munlock()"
3323
3324 #. type: Plain text
3325 #: build/C/man2/mlock.2:65
3326 msgid ""
3327 "B<mlock>()  locks pages in the address range starting at I<addr> and "
3328 "continuing for I<len> bytes.  All pages that contain a part of the specified "
3329 "address range are guaranteed to be resident in RAM when the call returns "
3330 "successfully; the pages are guaranteed to stay in RAM until later unlocked."
3331 msgstr ""
3332 "B<mlock>()  は I<addr> から始まる長さ I<len> バイトのアドレス範囲のページを"
3333 "ロックする。 呼び出しが成功した場合には、 指定されたアドレス範囲を含む全ての"
3334 "ページは RAM に残り続けることが保証される。 これらのページは後でロック解除さ"
3335 "れるまで RAM に残り続けることが保証される。"
3336
3337 #. type: Plain text
3338 #: build/C/man2/mlock.2:74
3339 msgid ""
3340 "B<munlock>()  unlocks pages in the address range starting at I<addr> and "
3341 "continuing for I<len> bytes.  After this call, all pages that contain a part "
3342 "of the specified memory range can be moved to external swap space again by "
3343 "the kernel."
3344 msgstr ""
3345 "B<munlock>()  は、 I<addr> から始まる長さ I<len> バイトのアドレス範囲のページ"
3346 "のロックを解除する。 この呼び出しを行った後は、カーネルが、指定されたメモリ範"
3347 "囲を含む 全てのページを外部のスワップ空間に移動できるようになる。"
3348
3349 #. type: SS
3350 #: build/C/man2/mlock.2:74
3351 #, no-wrap
3352 msgid "mlockall() and munlockall()"
3353 msgstr "mlockall() と munlockall()"
3354
3355 #. type: Plain text
3356 #: build/C/man2/mlock.2:84
3357 msgid ""
3358 "B<mlockall>()  locks all pages mapped into the address space of the calling "
3359 "process.  This includes the pages of the code, data and stack segment, as "
3360 "well as shared libraries, user space kernel data, shared memory, and memory-"
3361 "mapped files.  All mapped pages are guaranteed to be resident in RAM when "
3362 "the call returns successfully; the pages are guaranteed to stay in RAM until "
3363 "later unlocked."
3364 msgstr ""
3365 "B<mlockall>()  は呼び出し元プロセスのアドレス空間にマップされている全てのペー"
3366 "ジを ロックする。これにはコード、データ、スタックの 各セグメント、共有ライブ"
3367 "ラリ、カーネルのユーザー空間データ、 共有メモリ、メモリ・マップされたファイル"
3368 "が含まれる。 システム・コールが成功した場合には全てのマップされたページは "
3369 "RAM に 残ることを保証される。 これらのページは後でロック解除されるまで RAM に"
3370 "残り続けることが保証される。"
3371
3372 #. type: Plain text
3373 #: build/C/man2/mlock.2:89
3374 msgid ""
3375 "The I<flags> argument is constructed as the bitwise OR of one or more of the "
3376 "following constants:"
3377 msgstr "I<flags> 引数は以下の内容の一つまたは複数のビット OR から構成される:"
3378
3379 #. type: TP
3380 #: build/C/man2/mlock.2:89
3381 #, no-wrap
3382 msgid "B<MCL_CURRENT>"
3383 msgstr "B<MCL_CURRENT>"
3384
3385 #. type: Plain text
3386 #: build/C/man2/mlock.2:93
3387 msgid ""
3388 "Lock all pages which are currently mapped into the address space of the "
3389 "process."
3390 msgstr ""
3391 "現在、プロセスのアドレス空間にマップされている全てのページをロックする。"
3392
3393 #. type: TP
3394 #: build/C/man2/mlock.2:93
3395 #, no-wrap
3396 msgid "B<MCL_FUTURE>"
3397 msgstr "B<MCL_FUTURE>"
3398
3399 #. type: Plain text
3400 #: build/C/man2/mlock.2:100
3401 msgid ""
3402 "Lock all pages which will become mapped into the address space of the "
3403 "process in the future.  These could be for instance new pages required by a "
3404 "growing heap and stack as well as new memory mapped files or shared memory "
3405 "regions."
3406 msgstr ""
3407 "将来、プロセスのアドレス空間にマップされる全てのページをロックする。 例えば、"
3408 "ヒープ (heap) やスタックの成長により新しく必要になったページだけで なく、新し"
3409 "くメモリマップされたファイルや共有メモリ領域もロックされる。"
3410
3411 #. type: Plain text
3412 #: build/C/man2/mlock.2:113
3413 msgid ""
3414 "If B<MCL_FUTURE> has been specified, then a later system call (e.g., B<mmap>"
3415 "(2), B<sbrk>(2), B<malloc>(3)), may fail if it would cause the number of "
3416 "locked bytes to exceed the permitted maximum (see below).  In the same "
3417 "circumstances, stack growth may likewise fail: the kernel will deny stack "
3418 "expansion and deliver a B<SIGSEGV> signal to the process."
3419 msgstr ""
3420 "B<MCL_FUTURE> が指定されていると、以後のシステムコール (例えば、 B<mmap>(2), "
3421 "B<sbrk>(2), B<malloc>(3))  は、ロックするバイト数が許可された最大値 (下記参"
3422 "照) を超えた場合に 失敗する可能性がある。 同様に、スタックの成長も失敗する可"
3423 "能性がある。 その場合、カーネルはスタックの拡張を拒否し、 B<SIGSEGV> をプロセ"
3424 "スに送る。"
3425
3426 #. type: Plain text
3427 #: build/C/man2/mlock.2:117
3428 msgid ""
3429 "B<munlockall>()  unlocks all pages mapped into the address space of the "
3430 "calling process."
3431 msgstr ""
3432 "B<munlockall>()  は、呼び出し元プロセスのアドレス空間にマッピングされている "
3433 "全てのページをロック解除する。"
3434
3435 #. type: Plain text
3436 #: build/C/man2/mlock.2:123
3437 msgid ""
3438 "On success these system calls return 0.  On error, -1 is returned, I<errno> "
3439 "is set appropriately, and no changes are made to any locks in the address "
3440 "space of the process."
3441 msgstr ""
3442 "成功した場合は、これらのシステムコールはゼロを返す。 エラーの場合は -1 が返さ"
3443 "れ、 I<errno> が適切に設定され、プロセスのアドレス空間におけるロックは変更さ"
3444 "れない。"
3445
3446 #. type: Plain text
3447 #: build/C/man2/mlock.2:132
3448 msgid ""
3449 "(Linux 2.6.9 and later) the caller had a nonzero B<RLIMIT_MEMLOCK> soft "
3450 "resource limit, but tried to lock more memory than the limit permitted.  "
3451 "This limit is not enforced if the process is privileged (B<CAP_IPC_LOCK>)."
3452 msgstr ""
3453 "(Linux 2.6.9 以降) 呼び出し元は非ゼロの ソフト資源制限 B<RLIMIT_MEMLOCK> を持"
3454 "つが、制限が許可している以上のメモリをロックしようとした。 この制限は、プロセ"
3455 "スが特権 (B<CAP_IPC_LOCK>)  を持っている場合は適用されない。"
3456
3457 #.  In the case of mlock(), this check is somewhat buggy: it doesn't
3458 #.  take into account whether the to-be-locked range overlaps with
3459 #.  already locked pages.  Thus, suppose we allocate
3460 #.  (num_physpages / 4 + 1) of memory, and lock those pages once using
3461 #.  mlock(), and then lock the *same* page range a second time.
3462 #.  In the case, the second mlock() call will fail, since the check
3463 #.  calculates that the process is trying to lock (num_physpages / 2 + 2)
3464 #.  pages, which of course is not true.  (MTK, Nov 04, kernel 2.4.28)
3465 #. type: Plain text
3466 #: build/C/man2/mlock.2:144
3467 msgid ""
3468 "(Linux 2.4 and earlier) the calling process tried to lock more than half of "
3469 "RAM."
3470 msgstr ""
3471 "(Linux 2.4 以前) 呼び出し元プロセスが RAM の半分以上をロックしようとした。"
3472
3473 #. SVr4 documents an additional EAGAIN error code.
3474 #. type: Plain text
3475 #: build/C/man2/mlock.2:150
3476 msgid ""
3477 "The caller is not privileged, but needs privilege (B<CAP_IPC_LOCK>)  to "
3478 "perform the requested operation."
3479 msgstr ""
3480 "呼び出し側が特権を持っていないが、\n"
3481 "要求された操作を実行するには特権 (B<CAP_IPC_LOCK>) が必要である。"
3482
3483 #. type: Plain text
3484 #: build/C/man2/mlock.2:155
3485 msgid "For B<mlock>()  and B<munlock>():"
3486 msgstr "B<mlock>()  と B<munlock>()  用として:"
3487
3488 #. type: Plain text
3489 #: build/C/man2/mlock.2:158
3490 msgid "Some or all of the specified address range could not be locked."
3491 msgstr "指定されたアドレス範囲の一部または全てをロックすることができなかった。"
3492
3493 #. type: Plain text
3494 #: build/C/man2/mlock.2:165
3495 msgid ""
3496 "The result of the addition I<start>+I<len> was less than I<start> (e.g., the "
3497 "addition may have resulted in an overflow)."
3498 msgstr ""
3499 "I<start>+I<len> の加算の結果が I<start> よりも小さかった\n"
3500 "(例えば、加算でオーバーフローが発生したなど)。"
3501
3502 #. type: Plain text
3503 #: build/C/man2/mlock.2:170
3504 msgid "(Not on Linux)  I<addr> was not a multiple of the page size."
3505 msgstr ""
3506 "(Linux ではこの意味で使われない)  I<addr> がページサイズの倍数ではない。"
3507
3508 #. type: Plain text
3509 #: build/C/man2/mlock.2:174
3510 msgid ""
3511 "Some of the specified address range does not correspond to mapped pages in "
3512 "the address space of the process."
3513 msgstr ""
3514 "指定されたアドレス範囲がプロセスのアドレス空間にマップされたページと 一致しな"
3515 "い。"
3516
3517 #. type: Plain text
3518 #: build/C/man2/mlock.2:177
3519 msgid "For B<mlockall>():"
3520 msgstr "B<mlockall>()  用として:"
3521
3522 #. type: Plain text
3523 #: build/C/man2/mlock.2:180
3524 msgid "Unknown I<flags> were specified."
3525 msgstr "未知の I<flags> が指定された。"
3526
3527 #. type: Plain text
3528 #: build/C/man2/mlock.2:183
3529 msgid "For B<munlockall>():"
3530 msgstr "B<munlockall>()  用として:"
3531
3532 #. type: Plain text
3533 #: build/C/man2/mlock.2:187
3534 msgid ""
3535 "(Linux 2.6.8 and earlier) The caller was not privileged (B<CAP_IPC_LOCK>)."
3536 msgstr ""
3537 "(Linux 2.6.8 以前) 呼び出し元が権限 (B<CAP_IPC_LOCK>)  を持っていない。"
3538
3539 #. type: Plain text
3540 #: build/C/man2/mlock.2:189
3541 msgid "POSIX.1-2001, SVr4."
3542 msgstr "POSIX.1-2001, SVr4."
3543
3544 #. type: SH
3545 #: build/C/man2/mlock.2:189 build/C/man2/mmap.2:487 build/C/man2/msync.2:105
3546 #, no-wrap
3547 msgid "AVAILABILITY"
3548 msgstr "可用性"
3549
3550 #. type: Plain text
3551 #: build/C/man2/mlock.2:201
3552 msgid ""
3553 "On POSIX systems on which B<mlock>()  and B<munlock>()  are available, "
3554 "B<_POSIX_MEMLOCK_RANGE> is defined in I<E<lt>unistd.hE<gt>> and the number "
3555 "of bytes in a page can be determined from the constant B<PAGESIZE> (if "
3556 "defined) in I<E<lt>limits.hE<gt>> or by calling I<sysconf(_SC_PAGESIZE)>."
3557 msgstr ""
3558 "B<mlock>()  と B<munlock>()  が使用可能な POSIX システムでは "
3559 "B<_POSIX_MEMLOCK_RANGE> が I<E<lt>unistd.hE<gt>> で定義されている。 また、"
3560 "ページあたりのバイト数は、 I<E<lt>limits.hE<gt>> で定義される定数 "
3561 "B<PAGESIZE> から (定義されている場合)、もしくは I<sysconf(_SC_PAGESIZE)> を呼"
3562 "び出すことで決定できる。"
3563
3564 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
3565 #.  -1: unavailable, 0: ask using sysconf().
3566 #.  glibc defines it to 1.
3567 #. type: Plain text
3568 #: build/C/man2/mlock.2:214
3569 msgid ""
3570 "On POSIX systems on which B<mlockall>()  and B<munlockall>()  are available, "
3571 "B<_POSIX_MEMLOCK> is defined in I<E<lt>unistd.hE<gt>> to a value greater "
3572 "than 0.  (See also B<sysconf>(3).)"
3573 msgstr ""
3574 "B<mlockall>()  と B<munlockall>()  が利用可能な POSIX システムでは、 "
3575 "B<_POSIX_MEMLOCK> は I<E<lt>unistd.hE<gt>> で 0 より大きい値に定義されている "
3576 "(B<sysconf>(3)  も参照のこと)。"
3577
3578 #. type: Plain text
3579 #: build/C/man2/mlock.2:232
3580 msgid ""
3581 "Memory locking has two main applications: real-time algorithms and high-"
3582 "security data processing.  Real-time applications require deterministic "
3583 "timing, and, like scheduling, paging is one major cause of unexpected "
3584 "program execution delays.  Real-time applications will usually also switch "
3585 "to a real-time scheduler with B<sched_setscheduler>(2).  Cryptographic "
3586 "security software often handles critical bytes like passwords or secret keys "
3587 "as data structures.  As a result of paging, these secrets could be "
3588 "transferred onto a persistent swap store medium, where they might be "
3589 "accessible to the enemy long after the security software has erased the "
3590 "secrets in RAM and terminated.  (But be aware that the suspend mode on "
3591 "laptops and some desktop computers will save a copy of the system's RAM to "
3592 "disk, regardless of memory locks.)"
3593 msgstr ""
3594 "メモリのロックの用途としては主に二つある: リアルタイム アルゴリズムと高いセ"
3595 "キュリティの必要なデータ処理である。リアルタイムの アプリケーションは決定的な"
3596 "タイミングやスケジューリングを必要とするが、 ページングは予期しないプログラム"
3597 "の実行遅延をもたらす主要な要因となる。 リアルタイムのアプリケーションはたいて"
3598 "いは B<sched_setscheduler>(2)  でリアルタイムスケジューラに変更される。 暗号"
3599 "やセキュリティのソフトウェアはしばしばパスワードや秘密鍵のデータの ような重要"
3600 "なバイト列を扱う。ページングの結果、これらの秘密が スワップ用の固定媒体に転送"
3601 "されるかもしれない。そして、セキュリティ・ ソフトウェアが RAM 上の秘密を削除"
3602 "して終了したずっと後になっても、 このスワップされたデータには敵がアクセスでき"
3603 "る可能性がある (しかし、ラップトップといくつかのデスクトップコンピュータの サ"
3604 "スペンドモードはシステムの RAM の内容をメモリのロックに関わらず ディスクに保"
3605 "存することに注意)。"
3606
3607 #. type: Plain text
3608 #: build/C/man2/mlock.2:245
3609 msgid ""
3610 "Real-time processes that are using B<mlockall>()  to prevent delays on page "
3611 "faults should reserve enough locked stack pages before entering the time-"
3612 "critical section, so that no page fault can be caused by function calls.  "
3613 "This can be achieved by calling a function that allocates a sufficiently "
3614 "large automatic variable (an array) and writes to the memory occupied by "
3615 "this array in order to touch these stack pages.  This way, enough pages will "
3616 "be mapped for the stack and can be locked into RAM.  The dummy writes ensure "
3617 "that not even copy-on-write page faults can occur in the critical section."
3618 msgstr ""
3619 "リアルタイムプロセスが B<mlockall>()  を使ってページフォールトによる遅延を防"
3620 "ごうとする場合、 関数呼び出しによってページフォールトが発生しないように、 時"
3621 "間制限の厳しい部分 (time-critical section) に入る前に 十分な量のロックされた"
3622 "スタックを確保しておく必要がある。 これを実現するには、十分な大きさの自動変"
3623 "数 (の配列) を確保し、 これらのスタック用のページがメモリ上に確保されるように"
3624 "この配列に 書き込みを行う関数を用意し、これを呼び出せばよい。こうすること"
3625 "で、 十分な量のページがスタックにマッピングされ、RAM にロックされる。 ダミー"
3626 "の書き込みを行うことによって、 時間制限の厳しい部分 (critical section) 内では"
3627 "書き込み時コピーによる ページフォールトさえも発生しないことが保証される。"
3628
3629 #. type: Plain text
3630 #: build/C/man2/mlock.2:251
3631 msgid ""
3632 "Memory locks are not inherited by a child created via B<fork>(2)  and are "
3633 "automatically removed (unlocked) during an B<execve>(2)  or when the process "
3634 "terminates."
3635 msgstr ""
3636 "メモリロックは B<fork>(2)  で作成された子プロセスには継承されず、 B<execve>"
3637 "(2)  が呼ばれたり、プロセスが終了した場合は 自動的に削除される (ロック解除さ"
3638 "れる)。"
3639
3640 #. type: Plain text
3641 #: build/C/man2/mlock.2:255
3642 msgid ""
3643 "The memory lock on an address range is automatically removed if the address "
3644 "range is unmapped via B<munmap>(2)."
3645 msgstr ""
3646 "あるアドレス範囲に対するメモリロックは、そのアドレス範囲が B<munmap>(2)  に"
3647 "よってアンマップされた場合は削除される。"
3648
3649 #. type: Plain text
3650 #: build/C/man2/mlock.2:268
3651 msgid ""
3652 "Memory locks do not stack, that is, pages which have been locked several "
3653 "times by calls to B<mlock>()  or B<mlockall>()  will be unlocked by a single "
3654 "call to B<munlock>()  for the corresponding range or by B<munlockall>().  "
3655 "Pages which are mapped to several locations or by several processes stay "
3656 "locked into RAM as long as they are locked at least at one location or by at "
3657 "least one process."
3658 msgstr ""
3659 "メモリのロックは累積しない。 すなわち複数回 B<mlock>()  や B<mlockall>()  を"
3660 "呼び出してロックされたページでも、 対応する範囲に対して B<munlock>()  を 1 回"
3661 "呼び出したり B<munlockall>()  を呼び出したりするだけでロック解除される。 複数"
3662 "の場所や複数のプロセスにマップされているページは、少なくとも一つの場所、 一つ"
3663 "のプロセスでロックされている限りは RAM に残り続ける。"
3664
3665 #. type: Plain text
3666 #: build/C/man2/mlock.2:279
3667 msgid ""
3668 "Under Linux, B<mlock>()  and B<munlock>()  automatically round I<addr> down "
3669 "to the nearest page boundary.  However, POSIX.1-2001 allows an "
3670 "implementation to require that I<addr> is page aligned, so portable "
3671 "applications should ensure this."
3672 msgstr ""
3673 "Linux では、 B<mlock>()  と B<munlock>()  は自動的に I<addr> を端数切り捨てに"
3674 "より一番近いページ境界へと丸める。 しかし POSIX.1-2001 は I<addr> がページ境"
3675 "界に合っていることを要求する実装も許している。 そのため移植性を意図したアプリ"
3676 "ケーションではきちんと境界に合わせた方が良い。"
3677
3678 #. type: Plain text
3679 #: build/C/man2/mlock.2:292
3680 msgid ""
3681 "The I<VmLck> field of the Linux-specific I</proc/PID/status> file shows how "
3682 "many kilobytes of memory the process with ID I<PID> has locked using B<mlock>"
3683 "(), B<mlockall>(), and B<mmap>(2)  B<MAP_LOCKED>."
3684 msgstr ""
3685 "Linux 固有の I</proc/PID/status> ファイルの I<VmLck> フィールドには、\n"
3686 "B<mlock>(), B<mlockall>() および B<mmap>(2) B<MAP_LOCKED> を使って、\n"
3687 "ID が I<PID> のプロセスがロックしているメモリ量 (キロバイト単位) が\n"
3688 "表示される。"
3689
3690 #. type: SS
3691 #: build/C/man2/mlock.2:292
3692 #, no-wrap
3693 msgid "Limits and permissions"
3694 msgstr "制限と権限"
3695
3696 #. type: Plain text
3697 #: build/C/man2/mlock.2:299
3698 msgid ""
3699 "In Linux 2.6.8 and earlier, a process must be privileged (B<CAP_IPC_LOCK>)  "
3700 "in order to lock memory and the B<RLIMIT_MEMLOCK> soft resource limit "
3701 "defines a limit on how much memory the process may lock."
3702 msgstr ""
3703 "Linux 2.6.8 以前では、メモリをロックするためには特権 (B<CAP_IPC_LOCK>)  が必"
3704 "要で、 ソフト資源制限 B<RLIMIT_MEMLOCK> はプロセスがどれだけのメモリをロック"
3705 "できるかの制限を定義する。"
3706
3707 #. type: Plain text
3708 #: build/C/man2/mlock.2:305
3709 msgid ""
3710 "Since Linux 2.6.9, no limits are placed on the amount of memory that a "
3711 "privileged process can lock and the B<RLIMIT_MEMLOCK> soft resource limit "
3712 "instead defines a limit on how much memory an unprivileged process may lock."
3713 msgstr ""
3714 "Linux 2.6.9 以降では、特権を持つプロセスがロックできるメモリ量は無制限とな"
3715 "り、 代わりにソフト資源制限 B<RLIMIT_MEMLOCK> は特権を持たないプロセスがロッ"
3716 "クできるメモリ量の制限を定義する。"
3717
3718 #. type: Plain text
3719 #: build/C/man2/mlock.2:313
3720 msgid ""
3721 "In the 2.4 series Linux kernels up to and including 2.4.17, a bug caused the "
3722 "B<mlockall>()  B<MCL_FUTURE> flag to be inherited across a B<fork>(2).  This "
3723 "was rectified in kernel 2.4.18."
3724 msgstr ""
3725 "2.4.17 までの 2.4 シリーズの Linux カーネルには、 B<mlockall>()  "
3726 "B<MCL_FUTURE> フラグが B<fork>(2)  で継承されると言うバグがある。 これはカー"
3727 "ネル 2.4.18 で修正された。"
3728
3729 #.  See the following LKML thread:
3730 #.  http://marc.theaimsgroup.com/?l=linux-kernel&m=113801392825023&w=2
3731 #.  "Rationale for RLIMIT_MEMLOCK"
3732 #.  23 Jan 2006
3733 #. type: Plain text
3734 #: build/C/man2/mlock.2:330
3735 msgid ""
3736 "Since kernel 2.6.9, if a privileged process calls I<mlockall(MCL_FUTURE)> "
3737 "and later drops privileges (loses the B<CAP_IPC_LOCK> capability by, for "
3738 "example, setting its effective UID to a nonzero value), then subsequent "
3739 "memory allocations (e.g., B<mmap>(2), B<brk>(2))  will fail if the "
3740 "B<RLIMIT_MEMLOCK> resource limit is encountered."
3741 msgstr ""
3742 "カーネル 2.6.9 以降では、特権を持ったプロセスが I<mlockall(MCL_FUTURE)> を呼"
3743 "び出した後で、特権をなくした場合 (例えば、 実効 UID を 0 以外の値に変更するな"
3744 "どにより、 B<CAP_IPC_LOCK> ケーパビリティを失った場合)、リソース上限 "
3745 "B<RLIMIT_MEMLOCK> に達すると、それ以降のメモリ割り当て (例えば B<mmap>(2), "
3746 "B<brk>(2))  は失敗する。"
3747
3748 #. type: Plain text
3749 #: build/C/man2/mlock.2:337
3750 msgid ""
3751 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5), "
3752 "B<capabilities>(7)"
3753 msgstr ""
3754 "B<mmap>(2), B<setrlimit>(2), B<shmctl>(2), B<sysconf>(3), B<proc>(5),\n"
3755 "B<capabilities>(7)"
3756
3757 #. type: TH
3758 #: build/C/man2/mmap.2:40
3759 #, no-wrap
3760 msgid "MMAP"
3761 msgstr "MMAP"
3762
3763 #. type: TH
3764 #: build/C/man2/mmap.2:40 build/C/man2/mmap2.2:29
3765 #, no-wrap
3766 msgid "2012-04-16"
3767 msgstr "2012-04-16"
3768
3769 #. type: Plain text
3770 #: build/C/man2/mmap.2:43
3771 msgid "mmap, munmap - map or unmap files or devices into memory"
3772 msgstr "mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする"
3773
3774 #. type: Plain text
3775 #: build/C/man2/mmap.2:51
3776 #, no-wrap
3777 msgid ""
3778 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3779 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
3780 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3781 msgstr ""
3782 "B<void *mmap(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<, int >I<flags>B<,>\n"
3783 "B<           int >I<fd>B<, off_t >I<offset>B<);>\n"
3784 "B<int munmap(void *>I<addr>B<, size_t >I<length>B<);>\n"
3785
3786 #. type: Plain text
3787 #: build/C/man2/mmap.2:61
3788 msgid ""
3789 "B<mmap>()  creates a new mapping in the virtual address space of the calling "
3790 "process.  The starting address for the new mapping is specified in I<addr>.  "
3791 "The I<length> argument specifies the length of the mapping."
3792 msgstr ""
3793 "B<mmap>()  は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成す"
3794 "る。 新しいマッピングの開始アドレスは I<addr> で指定される。マッピングの長さ"
3795 "は I<length> 引き数で指定される。"
3796
3797 #.  Before Linux 2.6.24, the address was rounded up to the next page
3798 #.  boundary; since 2.6.24, it is rounded down!
3799 #. type: Plain text
3800 #: build/C/man2/mmap.2:75
3801 msgid ""
3802 "If I<addr> is NULL, then the kernel chooses the address at which to create "
3803 "the mapping; this is the most portable method of creating a new mapping.  If "
3804 "I<addr> is not NULL, then the kernel takes it as a hint about where to place "
3805 "the mapping; on Linux, the mapping will be created at a nearby page "
3806 "boundary.  The address of the new mapping is returned as the result of the "
3807 "call."
3808 msgstr ""
3809 "I<addr> が NULL の場合、カーネルがマッピングを作成するアドレスを選択する。 こ"
3810 "の方法は最も移植性のある新しいマッピングの作成方法である。 I<addr> が NULL で"
3811 "ない場合、カーネルはマッピングをどこに配置するかのヒントとして I<addr> を使用"
3812 "する。Linux では、マッピングはすぐ近くのページ境界に作成される。 新しいマッピ"
3813 "ングのアドレスは、呼び出しの返り値として返される。"
3814
3815 #. type: Plain text
3816 #: build/C/man2/mmap.2:87
3817 msgid ""
3818 "The contents of a file mapping (as opposed to an anonymous mapping; see "
3819 "B<MAP_ANONYMOUS> below), are initialized using I<length> bytes starting at "
3820 "offset I<offset> in the file (or other object) referred to by the file "
3821 "descriptor I<fd>.  I<offset> must be a multiple of the page size as returned "
3822 "by I<sysconf(_SC_PAGE_SIZE)>."
3823 msgstr ""
3824 "ファイルマッピングの内容は、 ファイルディスクリプタ I<fd> で参照されるファイ"
3825 "ル (もしくは他のオブジェクト) のオフセット I<offset> から開始される "
3826 "I<length> バイトのデータで初期化される (ファイルマッピングは無名マッピングの"
3827 "反対語である。 B<MAP_ANONYMOUS> を参照)。 I<offset> は I<sysconf"
3828 "(_SC_PAGE_SIZE)> が返すページサイズの倍数でなければならない。"
3829
3830 #. type: Plain text
3831 #: build/C/man2/mmap.2:95
3832 msgid ""
3833 "The I<prot> argument describes the desired memory protection of the mapping "
3834 "(and must not conflict with the open mode of the file).  It is either "
3835 "B<PROT_NONE> or the bitwise OR of one or more of the following flags:"
3836 msgstr ""
3837 "引き数 I<prot> には、マッピングのメモリ保護をどのように行なうかを指定する "
3838 "(ファイルのオープンモードと矛盾してはいけない)。 I<prot> には、 B<PROT_NONE> "
3839 "か、以下のフラグをひとつ以上ビット毎の論理和 (OR) をとったものを 指定できる。"
3840
3841 #. type: TP
3842 #: build/C/man2/mmap.2:95 build/C/man2/mprotect.2:67
3843 #, no-wrap
3844 msgid "B<PROT_EXEC>"
3845 msgstr "B<PROT_EXEC>"
3846
3847 #. type: Plain text
3848 #: build/C/man2/mmap.2:98
3849 msgid "Pages may be executed."
3850 msgstr "ページは実行可能である。"
3851
3852 #. type: TP
3853 #: build/C/man2/mmap.2:98 build/C/man2/mprotect.2:61
3854 #, no-wrap
3855 msgid "B<PROT_READ>"
3856 msgstr "B<PROT_READ>"
3857
3858 #. type: Plain text
3859 #: build/C/man2/mmap.2:101
3860 msgid "Pages may be read."
3861 msgstr "ページは読み込み可能である。"
3862
3863 #. type: TP
3864 #: build/C/man2/mmap.2:101 build/C/man2/mprotect.2:64
3865 #, no-wrap
3866 msgid "B<PROT_WRITE>"
3867 msgstr "B<PROT_WRITE>"
3868
3869 #. type: Plain text
3870 #: build/C/man2/mmap.2:104
3871 msgid "Pages may be written."
3872 msgstr "ページに書き込み可能である。"
3873
3874 #. type: TP
3875 #: build/C/man2/mmap.2:104 build/C/man2/mprotect.2:58
3876 #, no-wrap
3877 msgid "B<PROT_NONE>"
3878 msgstr "B<PROT_NONE>"
3879
3880 #. type: Plain text
3881 #: build/C/man2/mmap.2:107
3882 msgid "Pages may not be accessed."
3883 msgstr "ページにはアクセスできない。"
3884
3885 #. type: Plain text
3886 #: build/C/man2/mmap.2:116
3887 msgid ""
3888 "The I<flags> argument determines whether updates to the mapping are visible "
3889 "to other processes mapping the same region, and whether updates are carried "
3890 "through to the underlying file.  This behavior is determined by including "
3891 "exactly one of the following values in I<flags>:"
3892 msgstr ""
3893 "I<flags> 引き数により、マッピングに対する更新が同じ領域をマッピングしている "
3894 "他のプロセスに見えるか、更新がマッピング元のファイルを通じて 伝えられるか、が"
3895 "決定される。この動作は、以下の値のいずれか一つだけ (複数は指定できない) を "
3896 "I<flags> に含めることで指定する。"
3897
3898 #. type: TP
3899 #: build/C/man2/mmap.2:116
3900 #, no-wrap
3901 msgid "B<MAP_SHARED>"
3902 msgstr "B<MAP_SHARED>"
3903
3904 #. type: Plain text
3905 #: build/C/man2/mmap.2:126
3906 msgid ""
3907 "Share this mapping.  Updates to the mapping are visible to other processes "
3908 "that map this file, and are carried through to the underlying file.  The "
3909 "file may not actually be updated until B<msync>(2)  or B<munmap>()  is "
3910 "called."
3911 msgstr ""
3912 "このマッピングを共有する。 マッピングに対する更新はこのファイルをマッピングし"
3913 "ている他のプロセス から見える。更新はマッピング元のファイルを通じて伝えられ"
3914 "る。 ただし、ファイルの実際の更新は B<msync>(2)  または B<munmap>()  が呼ばれ"
3915 "るまで行われないこともある。"
3916
3917 #. type: TP
3918 #: build/C/man2/mmap.2:126
3919 #, no-wrap
3920 msgid "B<MAP_PRIVATE>"
3921 msgstr "B<MAP_PRIVATE>"
3922
3923 #. type: Plain text
3924 #: build/C/man2/mmap.2:135
3925 msgid ""
3926 "Create a private copy-on-write mapping.  Updates to the mapping are not "
3927 "visible to other processes mapping the same file, and are not carried "
3928 "through to the underlying file.  It is unspecified whether changes made to "
3929 "the file after the B<mmap>()  call are visible in the mapped region."
3930 msgstr ""
3931 "プライベートな copy-on-write (書き込み時コピー) マップを生成する。 マッピング"
3932 "に対する更新は同じファイルをマッピングしている他のプロセス には見えず、更新が"
3933 "マッピング元のファイルを通じて伝えられることもない。 B<mmap>()  の呼び出し後"
3934 "にマッピング元のファイルに対して行われた変更が、 マップ領域に反映されるかどう"
3935 "かは規定されていない。"
3936
3937 #. type: Plain text
3938 #: build/C/man2/mmap.2:137
3939 msgid "Both of these flags are described in POSIX.1-2001."
3940 msgstr "上記の二つのフラグは POSIX.1-2001 で規定されている。"
3941
3942 #. type: Plain text
3943 #: build/C/man2/mmap.2:140
3944 msgid ""
3945 "In addition, zero or more of the following values can be ORed in I<flags>:"
3946 msgstr ""
3947 "さらに、以下の値のうち 0 個以上をビット毎の論理和 (OR) で I<flags> に指定する"
3948 "ことができる。"
3949
3950 #. type: TP
3951 #: build/C/man2/mmap.2:140
3952 #, no-wrap
3953 msgid "B<MAP_32BIT> (since Linux 2.4.20, 2.6)"
3954 msgstr "B<MAP_32BIT> (Linux 2.4.20, 2.6 以降)"
3955
3956 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
3957 #. type: Plain text
3958 #: build/C/man2/mmap.2:156
3959 msgid ""
3960 "Put the mapping into the first 2 Gigabytes of the process address space.  "
3961 "This flag is only supported on x86-64, for 64-bit programs.  It was added to "
3962 "allow thread stacks to be allocated somewhere in the first 2GB of memory, so "
3963 "as to improve context-switch performance on some early 64-bit processors.  "
3964 "Modern x86-64 processors no longer have this performance problem, so use of "
3965 "this flag is not required on those systems.  The B<MAP_32BIT> flag is "
3966 "ignored when B<MAP_FIXED> is set."
3967 msgstr ""
3968 "マッピングをプロセスのアドレス空間の先頭 2 ギガバイト以内に配置する。 このフ"
3969 "ラグがサポートされているのは x86-64 アーキテクチャ上の 64 ビットプログラムの"
3970 "みである。 このフラグが追加されたのは、スレッドのスタックをメモリの先頭 2GB "
3971 "以内の どこかに割り当てることで、初期のいくつかの 64 ビットプロセッサにおけ"
3972 "る コンテキストスイッチの性能問題を改善するためである。 最近の x86-64 プロ"
3973 "セッサではこの性能問題はもはや存在せず、 そのようなシステムではこのフラグを使"
3974 "用する必要はない。 B<MAP_FIXED> がセットされている場合は、 B<MAP_32BIT> フラ"
3975 "グは無視される。"
3976
3977 #. type: TP
3978 #: build/C/man2/mmap.2:156
3979 #, no-wrap
3980 msgid "B<MAP_ANON>"
3981 msgstr "B<MAP_ANON>"
3982
3983 #. type: Plain text
3984 #: build/C/man2/mmap.2:161
3985 msgid "Synonym for B<MAP_ANONYMOUS>.  Deprecated."
3986 msgstr "B<MAP_ANONYMOUS> の同義語。非推奨。"
3987
3988 #. type: TP
3989 #: build/C/man2/mmap.2:161
3990 #, no-wrap
3991 msgid "B<MAP_ANONYMOUS>"
3992 msgstr "B<MAP_ANONYMOUS>"
3993
3994 #. type: Plain text
3995 #: build/C/man2/mmap.2:183
3996 msgid ""
3997 "The mapping is not backed by any file; its contents are initialized to "
3998 "zero.  The I<fd> and I<offset> arguments are ignored; however, some "
3999 "implementations require I<fd> to be -1 if B<MAP_ANONYMOUS> (or B<MAP_ANON>)  "
4000 "is specified, and portable applications should ensure this.  The use of "
4001 "B<MAP_ANONYMOUS> in conjunction with B<MAP_SHARED> is only supported on "
4002 "Linux since kernel 2.4."
4003 msgstr ""
4004 "マッピングはどのファイルとも関連付けされない。 マッピングの内容は 0 で初期化"
4005 "される。 引き数 I<fd> と I<offset> は無視される。 ただし、実装によっては "
4006 "B<MAP_ANONYMOUS> (もしくは B<MAP_ANON>)  が指定された場合、 I<fd> を -1 にす"
4007 "る必要があり、 移植性が必要なアプリケーションでは必ず I<fd> を -1 にすべきで"
4008 "ある。 B<MAP_ANONYMOUS> と B<MAP_SHARED> を組み合わせての利用は カーネル 2.4 "
4009 "以降の Linux でのみサポートされている。"
4010
4011 #. type: TP
4012 #: build/C/man2/mmap.2:183
4013 #, no-wrap
4014 msgid "B<MAP_DENYWRITE>"
4015 msgstr "B<MAP_DENYWRITE>"
4016
4017 #.  Introduced in 1.1.36, removed in 1.3.24.
4018 #. type: Plain text
4019 #: build/C/man2/mmap.2:191
4020 msgid ""
4021 "This flag is ignored.  (Long ago, it signaled that attempts to write to the "
4022 "underlying file should fail with B<ETXTBUSY>.  But this was a source of "
4023 "denial-of-service attacks.)"
4024 msgstr ""
4025 "このフラグは無視される (ずっと前は、マップ元のファイルへの書き込みを行おうと"
4026 "すると、エラー B<ETXTBUSY> で失敗するようにシグナルが設定されていたが、これ"
4027 "は denial-of-service (サービス拒否) 攻撃の原因となった)。"
4028
4029 #. type: TP
4030 #: build/C/man2/mmap.2:191
4031 #, no-wrap
4032 msgid "B<MAP_EXECUTABLE>"
4033 msgstr "B<MAP_EXECUTABLE>"
4034
4035 #.  Introduced in 1.1.38, removed in 1.3.24. Flag tested in proc_follow_link.
4036 #.  (Long ago, it signaled that the underlying file is an executable.
4037 #.  However, that information was not really used anywhere.)
4038 #.  Linus talked about DOS related to MAP_EXECUTABLE, but he was thinking of
4039 #.  MAP_DENYWRITE?
4040 #. type: Plain text
4041 #: build/C/man2/mmap.2:199
4042 msgid "This flag is ignored."
4043 msgstr "このフラグは無視される。"
4044
4045 #. type: TP
4046 #: build/C/man2/mmap.2:199
4047 #, no-wrap
4048 msgid "B<MAP_FILE>"
4049 msgstr "B<MAP_FILE>"
4050
4051 #.  On some systems, this was required as the opposite of
4052 #.  MAP_ANONYMOUS -- mtk, 1 May 2007
4053 #. type: Plain text
4054 #: build/C/man2/mmap.2:205
4055 msgid "Compatibility flag.  Ignored."
4056 msgstr "互換性のためのフラグ。無視される。"
4057
4058 #. type: TP
4059 #: build/C/man2/mmap.2:205
4060 #, no-wrap
4061 msgid "B<MAP_FIXED>"
4062 msgstr "B<MAP_FIXED>"
4063
4064 #. type: Plain text
4065 #: build/C/man2/mmap.2:223
4066 msgid ""
4067 "Don't interpret I<addr> as a hint: place the mapping at exactly that "
4068 "address.  I<addr> must be a multiple of the page size.  If the memory region "
4069 "specified by I<addr> and I<len> overlaps pages of any existing mapping(s), "
4070 "then the overlapped part of the existing mapping(s) will be discarded.  If "
4071 "the specified address cannot be used, B<mmap>()  will fail.  Because "
4072 "requiring a fixed address for a mapping is less portable, the use of this "
4073 "option is discouraged."
4074 msgstr ""
4075 "I<addr> をアドレスのヒントとして使用するのではなく、 I<addr> で指定されたアド"
4076 "レスをそのまま使用してマッピングを配置する。 I<addr> はページサイズの倍数でな"
4077 "ければならない。 I<addr> と I<len> で指定されたメモリ領域が既存のマッピングの"
4078 "ページと重なる場合、 既存のマッピングの重なった部分は捨てられる。 もし指定さ"
4079 "れたアドレスが使用できない場合、 B<mmap>()  は失敗する。 マッピングに対して固"
4080 "定アドレスを要求するのは移植性の面で劣るので、 このオプションは使用しないこと"
4081 "を推奨する。"
4082
4083 #. type: TP
4084 #: build/C/man2/mmap.2:223
4085 #, no-wrap
4086 msgid "B<MAP_GROWSDOWN>"
4087 msgstr "B<MAP_GROWSDOWN>"
4088
4089 #. type: Plain text
4090 #: build/C/man2/mmap.2:228
4091 msgid ""
4092 "Used for stacks.  Indicates to the kernel virtual memory system that the "
4093 "mapping should extend downward in memory."
4094 msgstr ""
4095 "スタック用に使用される。マッピングをメモリ内で逆向きに行うことを カーネル仮想"
4096 "メモリシステムに指示する。 (訳注:マッピングは通常はメモリ・アドレスが増加す"
4097 "る向きに行うが、 このオプションを指定すると逆向きにマッピングを行う)"
4098
4099 #. type: TP
4100 #: build/C/man2/mmap.2:228
4101 #, no-wrap
4102 msgid "B<MAP_HUGETLB> (since Linux 2.6.32)"
4103 msgstr "B<MAP_HUGETLB> (Linux 2.6.32 以降)"
4104
4105 #. type: Plain text
4106 #: build/C/man2/mmap.2:234
4107 msgid ""
4108 "Allocate the mapping using \"huge pages.\" See the kernel source file "
4109 "I<Documentation/vm/hugetlbpage.txt> for further information."
4110 msgstr ""
4111 "\"huge page\" を使ってマッピングを割り当てる。 詳しい情報は、カーネル・ソース"
4112 "の I<Documentation/vm/hugetlbpage.txt> を参照。"
4113
4114 #. type: TP
4115 #: build/C/man2/mmap.2:234
4116 #, no-wrap
4117 msgid "B<MAP_LOCKED> (since Linux 2.5.37)"
4118 msgstr "B<MAP_LOCKED> (Linux 2.5.37 以降)"
4119
4120 #.  If set, the mapped pages will not be swapped out.
4121 #. type: Plain text
4122 #: build/C/man2/mmap.2:240
4123 msgid ""
4124 "Lock the pages of the mapped region into memory in the manner of B<mlock>"
4125 "(2).  This flag is ignored in older kernels."
4126 msgstr ""
4127 "マップされた領域のページを B<mlock>(2)  の方法でメモリ内にロックする。 それ以"
4128 "前のカーネルでは、このフラグは無視される。"
4129
4130 #. type: TP
4131 #: build/C/man2/mmap.2:240
4132 #, no-wrap
4133 msgid "B<MAP_NONBLOCK> (since Linux 2.5.46)"
4134 msgstr "B<MAP_NONBLOCK> (Linux 2.5.46 以降)"
4135
4136 #. type: Plain text
4137 #: build/C/man2/mmap.2:255
4138 msgid ""
4139 "Only meaningful in conjunction with B<MAP_POPULATE>.  Don't perform read-"
4140 "ahead: only create page tables entries for pages that are already present in "
4141 "RAM.  Since Linux 2.6.23, this flag causes B<MAP_POPULATE> to do nothing.  "
4142 "One day the combination of B<MAP_POPULATE> and B<MAP_NONBLOCK> may be "
4143 "reimplemented."
4144 msgstr ""
4145 "B<MAP_POPULATE> と組み合わせた場合のみ意味を持つ。 read-ahead (前もって読み込"
4146 "むこと) を実行しない。 単に、すでに RAM 上に存在するページに対して ページテー"
4147 "ブルエントリを作成するだけである。 Linux 2.6.23 以降では、このフラグは "
4148 "B<MAP_POPULATE> に何の影響も与えない。 いつか B<MAP_POPULATE> と "
4149 "B<MAP_NONBLOCK> を組み合わせた場合の動作は実装し直されるかもしれない。"
4150
4151 #. type: TP
4152 #: build/C/man2/mmap.2:255
4153 #, no-wrap
4154 msgid "B<MAP_NORESERVE>"
4155 msgstr "B<MAP_NORESERVE>"
4156
4157 #. type: Plain text
4158 #: build/C/man2/mmap.2:270
4159 msgid ""
4160 "Do not reserve swap space for this mapping.  When swap space is reserved, "
4161 "one has the guarantee that it is possible to modify the mapping.  When swap "
4162 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
4163 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
4164 "overcommit_memory> in B<proc>(5).  In kernels before 2.6, this flag only had "
4165 "effect for private writable mappings."
4166 msgstr ""
4167 "このマッピングに対するスワップ空間の予約を行わない。 スワップ空間を予約した場"
4168 "合は、このマッピングの変更が必ず可能なことが 保証される。予約を行わなかった場"
4169 "合、物理メモリに空きがないと 書き込み時に B<SIGSEGV> エラーを受け取ることがあ"
4170 "る。 B<proc>(5)  の I</proc/sys/vm/overcommit_memory> ファイルについての議論"
4171 "も参照。 バージョン 2.6 より前のカーネルでは、このフラグは書き込み可能な プラ"
4172 "イベート・マッピングについてのみ効果があった。"
4173
4174 #. type: TP
4175 #: build/C/man2/mmap.2:270
4176 #, no-wrap
4177 msgid "B<MAP_POPULATE> (since Linux 2.5.46)"
4178 msgstr "B<MAP_POPULATE> (Linux 2.5.46 以降)"
4179
4180 #. type: Plain text
4181 #: build/C/man2/mmap.2:277
4182 msgid ""
4183 "Populate (prefault) page tables for a mapping.  For a file mapping, this "
4184 "causes read-ahead on the file.  Later accesses to the mapping will not be "
4185 "blocked by page faults.  B<MAP_POPULATE> is only supported for private "
4186 "mappings since Linux 2.6.23."
4187 msgstr ""
4188 "マッピング用のページテーブルを配置 (populate) する ファイルマッピングの場合に"
4189 "は、これによりファイルが先読み (read-ahead)  が行われる。この以後は、マッピン"
4190 "グに対するアクセスがページフォールトで ブロックされることがなくなる。 "
4191 "B<MAP_POPULATE> は Linux 2.6.23 以降でプライベート・マッピングについてのみ サ"
4192 "ポートされている。"
4193
4194 #. type: TP
4195 #: build/C/man2/mmap.2:277
4196 #, no-wrap
4197 msgid "B<MAP_STACK> (since Linux 2.6.27)"
4198 msgstr "B<MAP_STACK> (Linux 2.6.27 以降)"
4199
4200 #.  See http://lwn.net/Articles/294642 "Tangled up in threads", 19 Aug 08
4201 #.  commit cd98a04a59e2f94fa64d5bf1e26498d27427d5e7
4202 #.  http://thread.gmane.org/gmane.linux.kernel/720412
4203 #.  "pthread_create() slow for many threads; also time to revisit 64b
4204 #.   context switch optimization?"
4205 #. type: Plain text
4206 #: build/C/man2/mmap.2:290
4207 msgid ""
4208 "Allocate the mapping at an address suitable for a process or thread stack.  "
4209 "This flag is currently a no-op, but is used in the glibc threading "
4210 "implementation so that if some architectures require special treatment for "
4211 "stack allocations, support can later be transparently implemented for glibc."
4212 msgstr ""
4213 "プロセスやスレッドのスタックに適したアドレスにマッピングを割り当てる。 現在の"
4214 "ところ、このフラグは何もしないが、 glibc のスレッド実装では使用されている。 "
4215 "これは、いくつかのアーキテクチャではスタックの割り当てに関して特別な扱い が必"
4216 "要な場合に、glibc にそのサポートを後で透過的に実装できるようにする ためであ"
4217 "る。"
4218
4219 #. type: TP
4220 #: build/C/man2/mmap.2:290
4221 #, no-wrap
4222 msgid "B<MAP_UNINITIALIZED> (since Linux 2.6.33)"
4223 msgstr "B<MAP_UNINITIALIZED> (Linux 2.6.33 以降)"
4224
4225 #. type: Plain text
4226 #: build/C/man2/mmap.2:300
4227 msgid ""
4228 "Don't clear anonymous pages.  This flag is intended to improve performance "
4229 "on embedded devices.  This flag is only honored if the kernel was configured "
4230 "with the B<CONFIG_MMAP_ALLOW_UNINITIALIZED> option.  Because of the security "
4231 "implications, that option is normally enabled only on embedded devices (i."
4232 "e., devices where one has complete control of the contents of user memory)."
4233 msgstr ""
4234 "無名ページ (anonymous page) のクリアを行わない。このフラグは組み込みデバイ"
4235 "ス\n"
4236 "での性能向上を目的に作られてものである。カーネルの設定で\n"
4237 "B<CONFIG_MMAP_ALLOW_UNINITIALIZED> オプションが有効になっている場合のみ、\n"
4238 "このフラグは効果を持つ。\n"
4239 "セキュリティ面の考慮から、このオプションは通常組み込みデバイス (すなわち、\n"
4240 "ユーザメモリの内容を完全に制御化におけるデバイス) においてのみ有効にされる。"
4241
4242 #. type: Plain text
4243 #: build/C/man2/mmap.2:308
4244 msgid ""
4245 "Of the above flags, only B<MAP_FIXED> is specified in POSIX.1-2001.  "
4246 "However, most systems also support B<MAP_ANONYMOUS> (or its synonym "
4247 "B<MAP_ANON>)."
4248 msgstr ""
4249 "上記のフラグの中では、 B<MAP_FIXED> だけが POSIX.1-2001 で規定されている。 し"
4250 "かしながら、ほとんどのシステムで B<MAP_ANONYMOUS> (またはその同義語である "
4251 "B<MAP_ANON>)  もサポートされている。"
4252
4253 #. type: Plain text
4254 #: build/C/man2/mmap.2:315
4255 msgid ""
4256 "Some systems document the additional flags B<MAP_AUTOGROW>, "
4257 "B<MAP_AUTORESRV>, B<MAP_COPY>, and B<MAP_LOCAL>."
4258 msgstr ""
4259 "いくつかのシステムでは、上記以外にフラグとして B<MAP_AUTOGROW>, "
4260 "B<MAP_AUTORESRV>, B<MAP_COPY>, B<MAP_LOCAL> が規定されている。"
4261
4262 #. type: Plain text
4263 #: build/C/man2/mmap.2:321
4264 msgid ""
4265 "Memory mapped by B<mmap>()  is preserved across B<fork>(2), with the same "
4266 "attributes."
4267 msgstr ""
4268 "B<mmap>()  によってマップされたメモリの属性は B<fork>(2)  の際に継承される。"
4269
4270 #. type: Plain text
4271 #: build/C/man2/mmap.2:329
4272 msgid ""
4273 "A file is mapped in multiples of the page size.  For a file that is not a "
4274 "multiple of the page size, the remaining memory is zeroed when mapped, and "
4275 "writes to that region are not written out to the file.  The effect of "
4276 "changing the size of the underlying file of a mapping on the pages that "
4277 "correspond to added or removed regions of the file is unspecified."
4278 msgstr ""
4279 "ファイルはページサイズの整数倍の領域にマップされる。サイズがページサイズの 整"
4280 "数倍でないファイルの場合、マップ時に残りの領域は 0 で埋められ、この領域へ 書"
4281 "きこみを行ってもファイルに書き出されることはない。マッピングを行った元 ファイ"
4282 "ルのサイズを変更した場合、元ファイルの追加されたり削除された領域に対応 する"
4283 "マップされたページに対してどのような影響があるかは規定されていない。"
4284
4285 #. type: SS
4286 #: build/C/man2/mmap.2:329
4287 #, no-wrap
4288 msgid "munmap()"
4289 msgstr "munmap()"
4290
4291 #. type: Plain text
4292 #: build/C/man2/mmap.2:339
4293 msgid ""
4294 "The B<munmap>()  system call deletes the mappings for the specified address "
4295 "range, and causes further references to addresses within the range to "
4296 "generate invalid memory references.  The region is also automatically "
4297 "unmapped when the process is terminated.  On the other hand, closing the "
4298 "file descriptor does not unmap the region."
4299 msgstr ""
4300 "システムコール B<munmap>()  は指定されたアドレス範囲のマップを消去し、 これ以"
4301 "降のその範囲内へのメモリ参照は不正となる。 この領域は、プロセスが終了したとき"
4302 "にも自動的にアンマップされる。 一方、ファイル記述子をクローズしても、この領域"
4303 "はアンマップされない。"
4304
4305 #. type: Plain text
4306 #: build/C/man2/mmap.2:349
4307 msgid ""
4308 "The address I<addr> must be a multiple of the page size.  All pages "
4309 "containing a part of the indicated range are unmapped, and subsequent "
4310 "references to these pages will generate B<SIGSEGV>.  It is not an error if "
4311 "the indicated range does not contain any mapped pages."
4312 msgstr ""
4313 "I<addr> アドレスはページサイズの整数倍でなければならない。指定された範囲の一"
4314 "部分を 含む全てのページはアンマップされ、これ以降にこれらのページへの参照があ"
4315 "ると B<SIGSEGV> が発生する。 指定した範囲内にマップされたページが一つも含まれ"
4316 "ていない場合でも エラーにならない。"
4317
4318 #. type: SS
4319 #: build/C/man2/mmap.2:349
4320 #, no-wrap
4321 msgid "Timestamps changes for file-backed mappings"
4322 msgstr "ファイルと関連付けられたマッピングに対するタイムスタンプの更新"
4323
4324 #. type: Plain text
4325 #: build/C/man2/mmap.2:356
4326 msgid ""
4327 "For file-backed mappings, the I<st_atime> field for the mapped file may be "
4328 "updated at any time between the B<mmap>()  and the corresponding unmapping; "
4329 "the first reference to a mapped page will update the field if it has not "
4330 "been already."
4331 msgstr ""
4332 "ファイルと関連付けられたマッピングの場合、マッピングされたファイルの "
4333 "I<st_atime> フィールドは、 B<mmap>()  されてからアンマップ (unmap) されるまで"
4334 "の間に更新されることがある。 それまでに更新が行われていなければ、マップされた"
4335 "ページへの最初の参照があった 際に更新される。"
4336
4337 #. type: Plain text
4338 #: build/C/man2/mmap.2:373
4339 msgid ""
4340 "The I<st_ctime> and I<st_mtime> field for a file mapped with B<PROT_WRITE> "
4341 "and B<MAP_SHARED> will be updated after a write to the mapped region, and "
4342 "before a subsequent B<msync>(2)  with the B<MS_SYNC> or B<MS_ASYNC> flag, if "
4343 "one occurs."
4344 msgstr ""
4345 "B<PROT_WRITE> と B<MAP_SHARED> の両方を指定してマップされたファイルの場合、書"
4346 "き込みがあると、 I<st_ctime> と I<st_mtime> の両フィールドは、マップされた領"
4347 "域への書き込みより後で、 B<MS_SYNC> または B<MS_ASYNC> フラグを指定して "
4348 "B<msync>(2)  が呼ばれる前までに更新される。"
4349
4350 #. type: Plain text
4351 #: build/C/man2/mmap.2:390
4352 msgid ""
4353 "On success, B<mmap>()  returns a pointer to the mapped area.  On error, the "
4354 "value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>)  is returned, and I<errno> "
4355 "is set appropriately.  On success, B<munmap>()  returns 0, on failure -1, "
4356 "and I<errno> is set (probably to B<EINVAL>)."
4357 msgstr ""
4358 "B<mmap>()  は成功するとマップされた領域へのポインタを返す。 失敗すると値 "
4359 "B<MAP_FAILED> (つまり I<(void\\ *)\\ -1>)  を返し、 I<errno> がエラーの内容に"
4360 "したがってセットされる。 B<munmap>()  は成功すると 0 を返す。失敗すると -1 を"
4361 "返し、 I<errno> がセットされる (多くの場合 B<EINVAL> になるだろう)。"
4362
4363 #. type: TP
4364 #: build/C/man2/mmap.2:391 build/C/man2/mprotect.2:80
4365 #: build/C/man3/shm_open.3:185 build/C/man3/shm_open.3:190
4366 #: build/C/man2/shmctl.2:295 build/C/man2/shmget.2:186
4367 #: build/C/man2/shmop.2:189
4368 #, no-wrap
4369 msgid "B<EACCES>"
4370 msgstr "B<EACCES>"
4371
4372 #. type: Plain text
4373 #: build/C/man2/mmap.2:411
4374 msgid ""
4375 "A file descriptor refers to a non-regular file.  Or B<MAP_PRIVATE> was "
4376 "requested, but I<fd> is not open for reading.  Or B<MAP_SHARED> was "
4377 "requested and B<PROT_WRITE> is set, but I<fd> is not open in read/write "
4378 "(B<O_RDWR>)  mode.  Or B<PROT_WRITE> is set, but the file is append-only."
4379 msgstr ""
4380 "以下のいずれかの場合。 ファイル記述子の参照先が通常のファイルではない (non-"
4381 "regular file) 。 B<MAP_PRIVATE> を要求したが I<fd> は読み込み用にオープンされ"
4382 "ていない。 B<MAP_SHARED> を要求して B<PROT_WRITE> をセットしたが I<fd> は読み"
4383 "書きモード (B<O_RDWR>)  でオープンされていない、 B<PROT_WRITE> をセットした"
4384 "が、ファイルは追加 (append) 専用である。"
4385
4386 #. type: Plain text
4387 #: build/C/man2/mmap.2:415
4388 msgid ""
4389 "The file has been locked, or too much memory has been locked (see "
4390 "B<setrlimit>(2))."
4391 msgstr ""
4392 "ファイルがロックされている。またはロックされているメモリが多すぎる "
4393 "(B<setrlimit>(2)  を参照)。"
4394
4395 #. type: Plain text
4396 #: build/C/man2/mmap.2:421
4397 msgid ""
4398 "I<fd> is not a valid file descriptor (and B<MAP_ANONYMOUS> was not set)."
4399 msgstr ""
4400 "I<fd> が有効なファイル記述子 (file descriptor) ではない (かつ "
4401 "B<MAP_ANONYMOUS> がセットされていない)。"
4402
4403 #. type: Plain text
4404 #: build/C/man2/mmap.2:429
4405 msgid ""
4406 "We don't like I<addr>, I<length>, or I<offset> (e.g., they are too large, or "
4407 "not aligned on a page boundary)."
4408 msgstr ""
4409 "I<addr> か I<length> か I<offset> が適切でない (例えば、大きすぎるとか、ペー"
4410 "ジ境界にアラインメントされていない)。"
4411
4412 #. type: Plain text
4413 #: build/C/man2/mmap.2:434
4414 msgid "(since Linux 2.6.12)  I<length> was 0."
4415 msgstr "(Linux 2.6.12 以降)  I<length> が 0 であった。"
4416
4417 #. type: Plain text
4418 #: build/C/man2/mmap.2:442
4419 msgid ""
4420 "I<flags> contained neither B<MAP_PRIVATE> or B<MAP_SHARED>, or contained "
4421 "both of these values."
4422 msgstr ""
4423 "I<flags> に B<MAP_PRIVATE> と B<MAP_SHARED> のどちらも含まれていなかった、も"
4424 "しくは その両方が含まれていた。"
4425
4426 #. type: TP
4427 #: build/C/man2/mmap.2:442 build/C/man3/shm_open.3:227
4428 #: build/C/man2/shmget.2:202
4429 #, no-wrap
4430 msgid "B<ENFILE>"
4431 msgstr "B<ENFILE>"
4432
4433 #.  [2.6.7] shmem_zero_setup()-->shmem_file_setup()-->get_empty_filp()
4434 #. type: Plain text
4435 #: build/C/man2/mmap.2:450 build/C/man2/shmget.2:206
4436 msgid "The system limit on the total number of open files has been reached."
4437 msgstr "システム全体でオープンされているファイルの総数が上限に達した。"
4438
4439 #. type: Plain text
4440 #: build/C/man2/mmap.2:454
4441 msgid ""
4442 "The underlying file system of the specified file does not support memory "
4443 "mapping."
4444 msgstr ""
4445 "指定されたファイルが置かれているファイルシステムがメモリマッピングをサポート "
4446 "していない。"
4447
4448 #. type: Plain text
4449 #: build/C/man2/mmap.2:458
4450 msgid ""
4451 "No memory is available, or the process's maximum number of mappings would "
4452 "have been exceeded."
4453 msgstr ""
4454 "メモリに空きがない、または処理中のプロセスのマッピング数が最大数を超過した。"
4455
4456 #.  (Since 2.4.25 / 2.6.0.)
4457 #. type: Plain text
4458 #: build/C/man2/mmap.2:467
4459 msgid ""
4460 "The I<prot> argument asks for B<PROT_EXEC> but the mapped area belongs to a "
4461 "file on a file system that was mounted no-exec."
4462 msgstr ""
4463 "I<prot> 引き数は B<PROT_EXEC> を行うように指定されているが、 no-exec でマウン"
4464 "トされたファイルシステム上のファイルに マップ領域が対応している。"
4465
4466 #. type: TP
4467 #: build/C/man2/mmap.2:467
4468 #, no-wrap
4469 msgid "B<ETXTBSY>"
4470 msgstr "B<ETXTBSY>"
4471
4472 #. type: Plain text
4473 #: build/C/man2/mmap.2:473
4474 msgid ""
4475 "B<MAP_DENYWRITE> was set but the object specified by I<fd> is open for "
4476 "writing."
4477 msgstr ""
4478 "B<MAP_DENYWRITE> がセットされているが I<fd> で指定されているオブジェクトは書"
4479 "き込み用に開かれている。"
4480
4481 #. type: Plain text
4482 #: build/C/man2/mmap.2:475
4483 msgid "Use of a mapped region can result in these signals:"
4484 msgstr "マップ領域を利用する際に、以下のシグナルが発生することがある:"
4485
4486 #. type: TP
4487 #: build/C/man2/mmap.2:475
4488 #, no-wrap
4489 msgid "B<SIGSEGV>"
4490 msgstr "B<SIGSEGV>"
4491
4492 #. type: Plain text
4493 #: build/C/man2/mmap.2:478
4494 msgid "Attempted write into a region mapped as read-only."
4495 msgstr "読み込み専用で mmap された領域へ書き込みを行おうとした。"
4496
4497 #. type: TP
4498 #: build/C/man2/mmap.2:478
4499 #, no-wrap
4500 msgid "B<SIGBUS>"
4501 msgstr "B<SIGBUS>"
4502
4503 #. type: Plain text
4504 #: build/C/man2/mmap.2:483
4505 msgid ""
4506 "Attempted access to a portion of the buffer that does not correspond to the "
4507 "file (for example, beyond the end of the file, including the case where "
4508 "another process has truncated the file)."
4509 msgstr ""
4510 "バッファのうち、ファイルに関連づけられていない部分 (例えばファイル末尾を越え"
4511 "た部分など。これには 他のプロセスがファイルを切り詰めた場合なども含まれる)  "
4512 "にアクセスしようとした。"
4513
4514 #.  SVr4 documents additional error codes ENXIO and ENODEV.
4515 #.  SUSv2 documents additional error codes EMFILE and EOVERFLOW.
4516 #. type: Plain text
4517 #: build/C/man2/mmap.2:487
4518 msgid "SVr4, 4.4BSD, POSIX.1-2001."
4519 msgstr "SVr4, 4.4BSD, POSIX.1-2001."
4520
4521 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
4522 #.  -1: unavailable, 0: ask using sysconf().
4523 #.  glibc defines it to 1.
4524 #. type: Plain text
4525 #: build/C/man2/mmap.2:501
4526 msgid ""
4527 "On POSIX systems on which B<mmap>(), B<msync>(2)  and B<munmap>()  are "
4528 "available, B<_POSIX_MAPPED_FILES> is defined in I<E<lt>unistd.hE<gt>> to a "
4529 "value greater than 0.  (See also B<sysconf>(3).)"
4530 msgstr ""
4531 "B<mmap>(), B<msync>(2)  B<munmap>()  が利用可能な POSIX システムでは、 "
4532 "B<_POSIX_MAPPED_FILES> は E<lt>unistd.hE<gt> で 0 より大きな値に定義される "
4533 "(B<sysconf>(3)  も参照のこと)。"
4534
4535 #.  Since around glibc 2.1/2.2, depending on the platform.
4536 #. type: Plain text
4537 #: build/C/man2/mmap.2:516
4538 msgid ""
4539 "This page describes the interface provided by the glibc B<mmap>()  wrapper "
4540 "function.  Originally, this function invoked a system call of the same "
4541 "name.  Since kernel 2.4, that system call has been superseded by B<mmap2>"
4542 "(2), and nowadays the glibc B<mmap>()  wrapper function invokes B<mmap2>(2)  "
4543 "with a suitably adjusted value for I<offset>."
4544 msgstr ""
4545 "このページでは glibc の B<mmap>() のラッパー関数が提供するインターフェース"
4546 "に\n"
4547 "ついて説明している。元々は、この関数は同じ名前のシステムコールを起動してい"
4548 "た。\n"
4549 "カーネル 2.4 以降、このシステムコールは B<mmap2>(2) に取って代わられ、現在\n"
4550 "では、 glibc の B<mmap>() のラッパー関数は I<offset> を適切に調整してから\n"
4551 "B<mmap2>(2) を起動する。"
4552
4553 #. type: Plain text
4554 #: build/C/man2/mmap.2:529
4555 msgid ""
4556 "On some hardware architectures (e.g., i386), B<PROT_WRITE> implies "
4557 "B<PROT_READ>.  It is architecture dependent whether B<PROT_READ> implies "
4558 "B<PROT_EXEC> or not.  Portable programs should always set B<PROT_EXEC> if "
4559 "they intend to execute code in the new mapping."
4560 msgstr ""
4561 "(i386 などの) いくつかのアーキテクチャでは、 B<PROT_WRITE> をセットすると、暗"
4562 "黙のうちに B<PROT_READ> がセットされる。 B<PROT_READ> をセットした際に暗黙の"
4563 "うちに B<PROT_EXEC> がセットされるかどうかは、アーキテクチャ依存である。 移植"
4564 "性を考慮したプログラムでは、 新規にマップした領域でコードを実行したい場合は、"
4565 "常に B<PROT_EXEC> をセットすべきである。"
4566
4567 #. type: Plain text
4568 #: build/C/man2/mmap.2:544
4569 msgid ""
4570 "The portable way to create a mapping is to specify I<addr> as 0 (NULL), and "
4571 "omit B<MAP_FIXED> from I<flags>.  In this case, the system chooses the "
4572 "address for the mapping; the address is chosen so as not to conflict with "
4573 "any existing mapping, and will not be 0.  If the B<MAP_FIXED> flag is "
4574 "specified, and I<addr> is 0 (NULL), then the mapped address will be 0 (NULL)."
4575 msgstr ""
4576 "マッピングを作成する移植性のある方法は、 I<addr> に 0 (NULL) を指定し、 "
4577 "I<flags> から B<MAP_FIXED> を外すことである。 この場合、システムがマッピング"
4578 "用のアドレスの選択を行う。 アドレスは既存のマッピングと衝突しないように、 か"
4579 "つ 0 にならないように選択される。 B<MAP_FIXED> フラグが指定され、かつ "
4580 "I<addr> が 0 (NULL)  の場合には、マップされるアドレスが 0 (NULL) になる。"
4581
4582 #. type: Plain text
4583 #: build/C/man2/mmap.2:549
4584 msgid ""
4585 "On Linux there are no guarantees like those suggested above under "
4586 "B<MAP_NORESERVE>.  By default, any process can be killed at any moment when "
4587 "the system runs out of memory."
4588 msgstr ""
4589 "Linux においては、上記の B<MAP_NORESERVE> で述べられているような保証はない。 "
4590 "デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制"
4591 "終了されるか分からないからである。"
4592
4593 #. type: Plain text
4594 #: build/C/man2/mmap.2:556
4595 msgid ""
4596 "In kernels before 2.6.7, the B<MAP_POPULATE> flag only has effect if I<prot> "
4597 "is specified as B<PROT_NONE>."
4598 msgstr ""
4599 "2.6.7 より前のカーネルでは、 I<prot> に B<PROT_NONE> が指定された場合にの"
4600 "み、 B<MAP_POPULATE> フラグが効力を持つ。"
4601
4602 #. type: Plain text
4603 #: build/C/man2/mmap.2:571
4604 msgid ""
4605 "SUSv3 specifies that B<mmap>()  should fail if I<length> is 0.  However, in "
4606 "kernels before 2.6.12, B<mmap>()  succeeded in this case: no mapping was "
4607 "created and the call returned I<addr>.  Since kernel 2.6.12, B<mmap>()  "
4608 "fails with the error B<EINVAL> for this case."
4609 msgstr ""
4610 "SUSv3 では、 I<length> が 0 の場合、 B<mmap>()  は失敗すると規定されている。"
4611 "しかしながら、2.6.12 より前のカーネルでは、 この場合に B<mmap>()  は成功して"
4612 "いた (マッピングは作成されず、 I<addr> が返されていた)。 カーネル 2.6.12 以降"
4613 "では、 B<mmap>()  はエラー B<EINVAL> で失敗する。"
4614
4615 #. type: Plain text
4616 #: build/C/man2/mmap.2:583
4617 msgid ""
4618 "The following program prints part of the file specified in its first command-"
4619 "line argument to standard output.  The range of bytes to be printed is "
4620 "specified via offset and length values in the second and third command-line "
4621 "arguments.  The program creates a memory mapping of the required pages of "
4622 "the file and then uses B<write>(2)  to output the desired bytes."
4623 msgstr ""
4624 "以下のプログラムは、一番目のコマンドライン引き数で指定された ファイルの一部を"
4625 "標準出力に表示する。 表示する範囲は、二番目、三番目のコマンドライン引き数で渡"
4626 "される オフセットと長さで指定される。 このプログラムは、指定されたファイルの"
4627 "必要なページのメモリ・ マッピングを作成し、 B<write>(2)  を使って所望のバイト"
4628 "を出力する。"
4629
4630 #. type: Plain text
4631 #: build/C/man2/mmap.2:591
4632 #, no-wrap
4633 msgid ""
4634 "#include E<lt>sys/mman.hE<gt>\n"
4635 "#include E<lt>sys/stat.hE<gt>\n"
4636 "#include E<lt>fcntl.hE<gt>\n"
4637 "#include E<lt>stdio.hE<gt>\n"
4638 "#include E<lt>stdlib.hE<gt>\n"
4639 "#include E<lt>unistd.hE<gt>\n"
4640 msgstr ""
4641 "#include E<lt>sys/mman.hE<gt>\n"
4642 "#include E<lt>sys/stat.hE<gt>\n"
4643 "#include E<lt>fcntl.hE<gt>\n"
4644 "#include E<lt>stdio.hE<gt>\n"
4645 "#include E<lt>stdlib.hE<gt>\n"
4646 "#include E<lt>unistd.hE<gt>\n"
4647
4648 #. type: Plain text
4649 #: build/C/man2/mmap.2:594 build/C/man2/mprotect.2:172
4650 #, no-wrap
4651 msgid ""
4652 "#define handle_error(msg) \\e\n"
4653 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4654 msgstr ""
4655 "#define handle_error(msg) \\e\n"
4656 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4657
4658 #. type: Plain text
4659 #: build/C/man2/mmap.2:604
4660 #, no-wrap
4661 msgid ""
4662 "int\n"
4663 "main(int argc, char *argv[])\n"
4664 "{\n"
4665 "    char *addr;\n"
4666 "    int fd;\n"
4667 "    struct stat sb;\n"
4668 "    off_t offset, pa_offset;\n"
4669 "    size_t length;\n"
4670 "    ssize_t s;\n"
4671 msgstr ""
4672 "int\n"
4673 "main(int argc, char *argv[])\n"
4674 "{\n"
4675 "    char *addr;\n"
4676 "    int fd;\n"
4677 "    struct stat sb;\n"
4678 "    off_t offset, pa_offset;\n"
4679 "    size_t length;\n"
4680 "    ssize_t s;\n"
4681
4682 #. type: Plain text
4683 #: build/C/man2/mmap.2:609
4684 #, no-wrap
4685 msgid ""
4686 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
4687 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4688 "        exit(EXIT_FAILURE);\n"
4689 "    }\n"
4690 msgstr ""
4691 "    if (argc E<lt> 3 || argc E<gt> 4) {\n"
4692 "        fprintf(stderr, \"%s file offset [length]\\en\", argv[0]);\n"
4693 "        exit(EXIT_FAILURE);\n"
4694 "    }\n"
4695
4696 #. type: Plain text
4697 #: build/C/man2/mmap.2:613
4698 #, no-wrap
4699 msgid ""
4700 "    fd = open(argv[1], O_RDONLY);\n"
4701 "    if (fd == -1)\n"
4702 "        handle_error(\"open\");\n"
4703 msgstr ""
4704 "    fd = open(argv[1], O_RDONLY);\n"
4705 "    if (fd == -1)\n"
4706 "        handle_error(\"open\");\n"
4707
4708 #. type: Plain text
4709 #: build/C/man2/mmap.2:616
4710 #, no-wrap
4711 msgid ""
4712 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
4713 "        handle_error(\"fstat\");\n"
4714 msgstr ""
4715 "    if (fstat(fd, &sb) == -1)           /* To obtain file size */\n"
4716 "        handle_error(\"fstat\");\n"
4717
4718 #. type: Plain text
4719 #: build/C/man2/mmap.2:620
4720 #, no-wrap
4721 msgid ""
4722 "    offset = atoi(argv[2]);\n"
4723 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4724 "        /* offset for mmap() must be page aligned */\n"
4725 msgstr ""
4726 "    offset = atoi(argv[2]);\n"
4727 "    pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1);\n"
4728 "        /* offset for mmap() must be page aligned */\n"
4729
4730 #. type: Plain text
4731 #: build/C/man2/mmap.2:625
4732 #, no-wrap
4733 msgid ""
4734 "    if (offset E<gt>= sb.st_size) {\n"
4735 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
4736 "        exit(EXIT_FAILURE);\n"
4737 "    }\n"
4738 msgstr ""
4739 "    if (offset E<gt>= sb.st_size) {\n"
4740 "        fprintf(stderr, \"offset is past end of file\\en\");\n"
4741 "        exit(EXIT_FAILURE);\n"
4742 "    }\n"
4743
4744 #. type: Plain text
4745 #: build/C/man2/mmap.2:631
4746 #, no-wrap
4747 msgid ""
4748 "    if (argc == 4) {\n"
4749 "        length = atoi(argv[3]);\n"
4750 "        if (offset + length E<gt> sb.st_size)\n"
4751 "            length = sb.st_size - offset;\n"
4752 "                /* Can\\(aqt display bytes past end of file */\n"
4753 msgstr ""
4754 "    if (argc == 4) {\n"
4755 "        length = atoi(argv[3]);\n"
4756 "        if (offset + length E<gt> sb.st_size)\n"
4757 "            length = sb.st_size - offset;\n"
4758 "                /* Can\\(aqt display bytes past end of file */\n"
4759
4760 #. type: Plain text
4761 #: build/C/man2/mmap.2:635
4762 #, no-wrap
4763 msgid ""
4764 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
4765 "        length = sb.st_size - offset;\n"
4766 "    }\n"
4767 msgstr ""
4768 "    } else {    /* No length arg ==E<gt> display to end of file */\n"
4769 "        length = sb.st_size - offset;\n"
4770 "    }\n"
4771
4772 #. type: Plain text
4773 #: build/C/man2/mmap.2:640
4774 #, no-wrap
4775 msgid ""
4776 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4777 "                MAP_PRIVATE, fd, pa_offset);\n"
4778 "    if (addr == MAP_FAILED)\n"
4779 "        handle_error(\"mmap\");\n"
4780 msgstr ""
4781 "    addr = mmap(NULL, length + offset - pa_offset, PROT_READ,\n"
4782 "                MAP_PRIVATE, fd, pa_offset);\n"
4783 "    if (addr == MAP_FAILED)\n"
4784 "        handle_error(\"mmap\");\n"
4785
4786 #. type: Plain text
4787 #: build/C/man2/mmap.2:645
4788 #, no-wrap
4789 msgid ""
4790 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4791 "    if (s != length) {\n"
4792 "        if (s == -1)\n"
4793 "            handle_error(\"write\");\n"
4794 msgstr ""
4795 "    s = write(STDOUT_FILENO, addr + offset - pa_offset, length);\n"
4796 "    if (s != length) {\n"
4797 "        if (s == -1)\n"
4798 "            handle_error(\"write\");\n"
4799
4800 #. type: Plain text
4801 #: build/C/man2/mmap.2:649
4802 #, no-wrap
4803 msgid ""
4804 "        fprintf(stderr, \"partial write\");\n"
4805 "        exit(EXIT_FAILURE);\n"
4806 "    }\n"
4807 msgstr ""
4808 "        fprintf(stderr, \"partial write\");\n"
4809 "        exit(EXIT_FAILURE);\n"
4810 "    }\n"
4811
4812 #. type: Plain text
4813 #: build/C/man2/mmap.2:666
4814 msgid ""
4815 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4816 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4817 "(2), B<shm_open>(3), B<shm_overview>(7)"
4818 msgstr ""
4819 "B<getpagesize>(2), B<mincore>(2), B<mlock>(2), B<mmap2>(2), B<mprotect>(2), "
4820 "B<mremap>(2), B<msync>(2), B<remap_file_pages>(2), B<setrlimit>(2), B<shmat>"
4821 "(2), B<shm_open>(3), B<shm_overview>(7)"
4822
4823 #. type: Plain text
4824 #: build/C/man2/mmap.2:671 build/C/man2/msync.2:122
4825 msgid "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4826 msgstr "B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391."
4827
4828 #. type: TH
4829 #: build/C/man2/mmap2.2:29
4830 #, no-wrap
4831 msgid "MMAP2"
4832 msgstr "MMAP2"
4833
4834 #. type: Plain text
4835 #: build/C/man2/mmap2.2:32
4836 msgid "mmap2 - map files or devices into memory"
4837 msgstr "mmap2 - ファイルやデバイスをメモリにマップする"
4838
4839 #. type: Plain text
4840 #: build/C/man2/mmap2.2:38
4841 #, no-wrap
4842 msgid ""
4843 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4844 "B<             int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4845 msgstr ""
4846 "B<void *mmap2(void *>I<addr>B<, size_t >I<length>B<, int >I<prot>B<,>\n"
4847 "B<            int >I<flags>B<, int >I<fd>B<, off_t >I<pgoffset>B<);>\n"
4848
4849 #. type: Plain text
4850 #: build/C/man2/mmap2.2:43
4851 msgid ""
4852 "This is probably not the system call you are interested; instead, see B<mmap>"
4853 "(2), which describes the glibc wrapper function that invokes this system "
4854 "call."
4855 msgstr ""
4856 "これはおそらくあなたが興味のあるシステムコールではないだろう。代わりに\n"
4857 "B<mmap>(2) を見るとよい。そのページにはこのシステムコールを起動する glibc "
4858 "の\n"
4859 "ラッパー関数についての説明がある。"
4860
4861 #. type: Plain text
4862 #: build/C/man2/mmap2.2:54
4863 msgid ""
4864 "The B<mmap2>()  system call provides the same interface as B<mmap>(2), "
4865 "except that the final argument specifies the offset into the file in 4096-"
4866 "byte units (instead of bytes, as is done by B<mmap>(2)).  This enables "
4867 "applications that use a 32-bit I<off_t> to map large files (up to 2^44 "
4868 "bytes)."
4869 msgstr ""
4870 "B<mmap2>() システムコールは B<mmap>(2) と同じインターフェースを提供する。た"
4871 "だ\n"
4872 "し、最後の引き数には、ファイルのオフセットを (B<mmap>(2) が行っている、バイ"
4873 "ト\n"
4874 "単位ではなく) 4096 バイトを単位として指定する。 これにより、32 ビットの\n"
4875 "I<off_t> を使うアプリケーションで (2^44 バイトまでの) 大きなファイルをマッ"
4876 "プ\n"
4877 "できるようになる。"
4878
4879 #. type: Plain text
4880 #: build/C/man2/mmap2.2:61
4881 msgid ""
4882 "On success, B<mmap2>()  returns a pointer to the mapped area.  On error -1 "
4883 "is returned and I<errno> is set appropriately."
4884 msgstr ""
4885 "成功した場合、 B<mmap2>()  はマップされた領域へのポインタを返す。 エラーの場"
4886 "合は -1 が返されて、 I<errno> が適切に設定される。"
4887
4888 #. type: Plain text
4889 #: build/C/man2/mmap2.2:65
4890 msgid "Problem with getting the data from userspace."
4891 msgstr "ユーザ空間からデータを取得するときに問題があった。"
4892
4893 #. type: Plain text
4894 #: build/C/man2/mmap2.2:70
4895 msgid ""
4896 "(Various platforms where the page size is not 4096 bytes.)  I<offset * 4096> "
4897 "is not a multiple of the system page size."
4898 msgstr ""
4899 "(ページサイズが 4096 バイトでないプラットフォームにおいて)  I<offset * 4096> "
4900 "がシステムのページサイズの倍数ではない。"
4901
4902 #. type: Plain text
4903 #: build/C/man2/mmap2.2:74
4904 msgid "B<mmap2>()  can also return any of the errors described in B<mmap>(2)."
4905 msgstr "B<mmap2>() は B<mmap>(2) に載っているエラーを返すこともある。"
4906
4907 #. type: Plain text
4908 #: build/C/man2/mmap2.2:77
4909 msgid "B<mmap2>()  is available since Linux 2.3.31."
4910 msgstr "B<mmap2>()  は、Linux 2.3.31 以降で使用可能である。"
4911
4912 #. type: Plain text
4913 #: build/C/man2/mmap2.2:79 build/C/man2/subpage_prot.2:93
4914 msgid "This system call is Linux-specific."
4915 msgstr "このシステムコールは Linux 独自である。"
4916
4917 #. type: Plain text
4918 #: build/C/man2/mmap2.2:85
4919 msgid ""
4920 "Nowadays, the glibc B<mmap>()  wrapper function invokes this system call "
4921 "rather than the B<mmap>(2)  system call."
4922 msgstr ""
4923 "現在では、glibc の B<mmap>()  のラッパー関数は、 B<mmap>(2)  システムコールで"
4924 "はなく、このシステムコール (B<mmap2>(2))  を起動する。"
4925
4926 #.  ia64 can have page sizes ranging from 4kB to 64kB.
4927 #.  On cris, it looks like the unit might also be the page size,
4928 #.  which is 8192 bytes. -- mtk, June 2007
4929 #. type: Plain text
4930 #: build/C/man2/mmap2.2:92
4931 msgid ""
4932 "On ia64, the unit for I<offset> is actually the system page size, rather "
4933 "than 4096 bytes."
4934 msgstr ""
4935 "ia64 では、 I<offset> の単位は、実際にはシステムのページサイズであり、 4096 "
4936 "バイトではない。"
4937
4938 #. type: Plain text
4939 #: build/C/man2/mmap2.2:98
4940 msgid ""
4941 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4942 msgstr ""
4943 "B<getpagesize>(2), B<mmap>(2), B<mremap>(2), B<msync>(2), B<shm_open>(3)"
4944
4945 #. type: TH
4946 #: build/C/man2/mprotect.2:32
4947 #, no-wrap
4948 msgid "MPROTECT"
4949 msgstr "MPROTECT"
4950
4951 #. type: TH
4952 #: build/C/man2/mprotect.2:32
4953 #, no-wrap
4954 msgid "2011-09-08"
4955 msgstr "2011-09-08"
4956
4957 #. type: Plain text
4958 #: build/C/man2/mprotect.2:35
4959 msgid "mprotect - set protection on a region of memory"
4960 msgstr "mprotect - メモリ領域の保護を設定する"
4961
4962 #. type: Plain text
4963 #: build/C/man2/mprotect.2:40
4964 #, no-wrap
4965 msgid "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4966 msgstr "B<int mprotect(const void *>I<addr>B<, size_t >I<len>B<, int >I<prot>B<);>\n"
4967
4968 #. type: Plain text
4969 #: build/C/man2/mprotect.2:48
4970 msgid ""
4971 "B<mprotect>()  changes protection for the calling process's memory page(s)  "
4972 "containing any part of the address range in the interval [I<addr>,\\ I<addr>"
4973 "+I<len>-1].  I<addr> must be aligned to a page boundary."
4974 msgstr ""
4975 "B<mprotect>()  は、区間 [I<addr>,\\ I<addr>+I<len>-1] のアドレス範囲を含む 呼"
4976 "び出し元のプロセスのメモリページのアクセス保護を変更する。 I<addr> はページ境"
4977 "界に一致していなければならない。"
4978
4979 #. type: Plain text
4980 #: build/C/man2/mprotect.2:53
4981 msgid ""
4982 "If the calling process tries to access memory in a manner that violates the "
4983 "protection, then the kernel generates a B<SIGSEGV> signal for the process."
4984 msgstr ""
4985 "呼び出し元のプロセスがアクセス保護に違反するようなメモリアクセスを 行おうとす"
4986 "ると、カーネルはシグナル B<SIGSEGV> をそのプロセスに対して生成する。"
4987
4988 #. type: Plain text
4989 #: build/C/man2/mprotect.2:58
4990 msgid ""
4991 "I<prot> is either B<PROT_NONE> or a bitwise-or of the other values in the "
4992 "following list:"
4993 msgstr ""
4994 "I<prot> には、 B<PROT_NONE> か、以下のリストの B<PROT_NONE> 以外の値をビット"
4995 "毎の論理和 (bitwize-or) で指定する:"
4996
4997 #. type: Plain text
4998 #: build/C/man2/mprotect.2:61
4999 msgid "The memory cannot be accessed at all."
5000 msgstr "そのメモリには全くアクセスできない。"
5001
5002 #. type: Plain text
5003 #: build/C/man2/mprotect.2:64
5004 msgid "The memory can be read."
5005 msgstr "そのメモリを読み取ることができる。"
5006
5007 #. type: Plain text
5008 #: build/C/man2/mprotect.2:67
5009 msgid "The memory can be modified."
5010 msgstr "そのメモリを変更できる。"
5011
5012 #.  FIXME
5013 #.  Document PROT_GROWSUP and PROT_GROWSDOWN
5014 #. type: Plain text
5015 #: build/C/man2/mprotect.2:72
5016 msgid "The memory can be executed."
5017 msgstr "そのメモリは実行可能である。"
5018
5019 #. type: Plain text
5020 #: build/C/man2/mprotect.2:79
5021 msgid ""
5022 "On success, B<mprotect>()  returns zero.  On error, -1 is returned, and "
5023 "I<errno> is set appropriately."
5024 msgstr ""
5025 "成功した場合、 B<mprotect>()  は 0 を返す。エラーの場合は -1 が返り、 "
5026 "I<errno> が適切に設定される。"
5027
5028 #. type: Plain text
5029 #: build/C/man2/mprotect.2:89
5030 msgid ""
5031 "The memory cannot be given the specified access.  This can happen, for "
5032 "example, if you B<mmap>(2)  a file to which you have read-only access, then "
5033 "ask B<mprotect>()  to mark it B<PROT_WRITE>."
5034 msgstr ""
5035 "指定されたアクセスをメモリに設定することができない。 これは、例えば ファイル"
5036 "を読み取り専用で B<mmap>(2)  しており、その領域に対して B<mprotect>()  を呼び"
5037 "出して B<PROT_WRITE> に設定しようとした場合に発生する。"
5038
5039 #.  Or: both PROT_GROWSUP and PROT_GROWSDOWN were specified in 'prot'.
5040 #. type: Plain text
5041 #: build/C/man2/mprotect.2:94
5042 msgid ""
5043 "I<addr> is not a valid pointer, or not a multiple of the system page size."
5044 msgstr ""
5045 "I<addr> が有効なポインタでないか、 システムのページサイズの倍数でない。"
5046
5047 #. type: Plain text
5048 #: build/C/man2/mprotect.2:97
5049 msgid "Internal kernel structures could not be allocated."
5050 msgstr "カーネル内部の構造体を割り当てることができなかった。"
5051
5052 #. type: Plain text
5053 #: build/C/man2/mprotect.2:107
5054 msgid ""
5055 "Addresses in the range [I<addr>, I<addr>+I<len>-1] are invalid for the "
5056 "address space of the process, or specify one or more pages that are not "
5057 "mapped.  (Before kernel 2.4.19, the error B<EFAULT> was incorrectly produced "
5058 "for these cases.)"
5059 msgstr ""
5060 "[I<addr>, I<addr>+I<len>-1] という範囲のアドレスがプロセスのアドレス空間とし"
5061 "て不正であるか、 その範囲のアドレスがマップされていない 1 つ以上のページを指"
5062 "している (カーネル 2.4.19 より前では、この状況でエラー B<EFAULT> が間違って生"
5063 "成されていた)。"
5064
5065 #.  SVr4 defines an additional error
5066 #.  code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
5067 #. type: Plain text
5068 #: build/C/man2/mprotect.2:116
5069 msgid ""
5070 "SVr4, POSIX.1-2001.  POSIX says that the behavior of B<mprotect>()  is "
5071 "unspecified if it is applied to a region of memory that was not obtained via "
5072 "B<mmap>(2)."
5073 msgstr ""
5074 "SVr4, POSIX.1-2001.  POSIX では、 B<mmap>(2)  経由で獲得していないメモリ領域"
5075 "に対して B<mprotect>()  を行った場合の B<mprotect>()  の動作は未定義であると"
5076 "されている。"
5077
5078 #. type: Plain text
5079 #: build/C/man2/mprotect.2:123
5080 msgid ""
5081 "On Linux it is always permissible to call B<mprotect>()  on any address in a "
5082 "process's address space (except for the kernel vsyscall area).  In "
5083 "particular it can be used to change existing code mappings to be writable."
5084 msgstr ""
5085 "Linux では、(カーネル vsyscall 領域以外の)  任意のプロセスアドレス空間に対し"
5086 "て B<mprotect>()  を呼び出すことが、常に許されている。 これは特に既存のコード"
5087 "マッピングを書き込み可能にするために使われる。"
5088
5089 #. type: Plain text
5090 #: build/C/man2/mprotect.2:133
5091 msgid ""
5092 "Whether B<PROT_EXEC> has any effect different from B<PROT_READ> is "
5093 "architecture- and kernel version-dependent.  On some hardware architectures "
5094 "(e.g., i386), B<PROT_WRITE> implies B<PROT_READ>."
5095 msgstr ""
5096 "B<PROT_EXEC> が B<PROT_READ> と異なる影響を持つか否かは、アーキテクチャとカー"
5097 "ネルのバージョンに依存する。 (i386 などの) いくつかのアーキテクチャでは、 "
5098 "B<PROT_WRITE> をセットすると、暗黙のうちに B<PROT_READ> がセットされる。"
5099
5100 #. type: Plain text
5101 #: build/C/man2/mprotect.2:142
5102 msgid ""
5103 "POSIX.1-2001 says that an implementation may permit access other than that "
5104 "specified in I<prot>, but at a minimum can only allow write access if "
5105 "B<PROT_WRITE> has been set, and must not allow any access if B<PROT_NONE> "
5106 "has been set."
5107 msgstr ""
5108 "POSIX.1-2001 では、 I<prot> で指定されていないアクセスを許可する実装を認めて"
5109 "いる。 ただし、最低限、 B<PROT_WRITE> がセットされている場合にのみ書き込みア"
5110 "クセスが許可され、 B<PROT_NONE> がセットされている場合にはアクセスは許可され"
5111 "ない点だけは 満たす必要がある。"
5112
5113 #. type: Plain text
5114 #: build/C/man2/mprotect.2:148
5115 msgid ""
5116 "The program below allocates four pages of memory, makes the third of these "
5117 "pages read-only, and then executes a loop that walks upward through the "
5118 "allocated region modifying bytes."
5119 msgstr ""
5120 "以下のプログラムは、メモリページを 4つ確保し、そのうち 3番目のページを 読み込"
5121 "み専用に設定する。その後で、確保した領域のアドレスの小さい方から 大きな方に向"
5122 "かって順番にバイト値を変更するループを実行する。"
5123
5124 #. type: Plain text
5125 #: build/C/man2/mprotect.2:151
5126 msgid ""
5127 "An example of what we might see when running the program is the following:"
5128 msgstr "プログラムを実行した場合の一例を以下に示す。"
5129
5130 #. type: Plain text
5131 #: build/C/man2/mprotect.2:157
5132 #, no-wrap
5133 msgid ""
5134 "$B< ./a.out>\n"
5135 "Start of region:        0x804c000\n"
5136 "Got SIGSEGV at address: 0x804e000\n"
5137 msgstr ""
5138 "$B< ./a.out>\n"
5139 "Start of region:        0x804c000\n"
5140 "Got SIGSEGV at address: 0x804e000\n"
5141
5142 #. type: Plain text
5143 #: build/C/man2/mprotect.2:169
5144 #, no-wrap
5145 msgid ""
5146 "#include E<lt>unistd.hE<gt>\n"
5147 "#include E<lt>signal.hE<gt>\n"
5148 "#include E<lt>stdio.hE<gt>\n"
5149 "#include E<lt>malloc.hE<gt>\n"
5150 "#include E<lt>stdlib.hE<gt>\n"
5151 "#include E<lt>errno.hE<gt>\n"
5152 "#include E<lt>sys/mman.hE<gt>\n"
5153 msgstr ""
5154 "#include E<lt>unistd.hE<gt>\n"
5155 "#include E<lt>signal.hE<gt>\n"
5156 "#include E<lt>stdio.hE<gt>\n"
5157 "#include E<lt>malloc.hE<gt>\n"
5158 "#include E<lt>stdlib.hE<gt>\n"
5159 "#include E<lt>errno.hE<gt>\n"
5160 "#include E<lt>sys/mman.hE<gt>\n"
5161
5162 #. type: Plain text
5163 #: build/C/man2/mprotect.2:174
5164 #, no-wrap
5165 msgid "char *buffer;\n"
5166 msgstr "char *buffer;\n"
5167
5168 #. type: Plain text
5169 #: build/C/man2/mprotect.2:182
5170 #, no-wrap
5171 msgid ""
5172 "static void\n"
5173 "handler(int sig, siginfo_t *si, void *unused)\n"
5174 "{\n"
5175 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
5176 "            (long) si-E<gt>si_addr);\n"
5177 "    exit(EXIT_FAILURE);\n"
5178 "}\n"
5179 msgstr ""
5180 "static void\n"
5181 "handler(int sig, siginfo_t *si, void *unused)\n"
5182 "{\n"
5183 "    printf(\"Got SIGSEGV at address: 0x%lx\\en\",\n"
5184 "            (long) si-E<gt>si_addr);\n"
5185 "    exit(EXIT_FAILURE);\n"
5186 "}\n"
5187
5188 #. type: Plain text
5189 #: build/C/man2/mprotect.2:189
5190 #, no-wrap
5191 msgid ""
5192 "int\n"
5193 "main(int argc, char *argv[])\n"
5194 "{\n"
5195 "    char *p;\n"
5196 "    int pagesize;\n"
5197 "    struct sigaction sa;\n"
5198 msgstr ""
5199 "int\n"
5200 "main(void)\n"
5201 "{\n"
5202 "    char *p;\n"
5203 "    int pagesize;\n"
5204 "    struct sigaction sa;\n"
5205
5206 #. type: Plain text
5207 #: build/C/man2/mprotect.2:195
5208 #, no-wrap
5209 msgid ""
5210 "    sa.sa_flags = SA_SIGINFO;\n"
5211 "    sigemptyset(&sa.sa_mask);\n"
5212 "    sa.sa_sigaction = handler;\n"
5213 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
5214 "        handle_error(\"sigaction\");\n"
5215 msgstr ""
5216 "    sa.sa_flags = SA_SIGINFO;\n"
5217 "    sigemptyset(&sa.sa_mask);\n"
5218 "    sa.sa_sigaction = handler;\n"
5219 "    if (sigaction(SIGSEGV, &sa, NULL) == -1)\n"
5220 "        handle_error(\"sigaction\");\n"
5221
5222 #. type: Plain text
5223 #: build/C/man2/mprotect.2:199
5224 #, no-wrap
5225 msgid ""
5226 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
5227 "    if (pagesize == -1)\n"
5228 "        handle_error(\"sysconf\");\n"
5229 msgstr ""
5230 "    pagesize = sysconf(_SC_PAGE_SIZE);\n"
5231 "    if (pagesize == -1)\n"
5232 "        handle_error(\"sysconf\");\n"
5233
5234 #. type: Plain text
5235 #: build/C/man2/mprotect.2:202
5236 #, no-wrap
5237 msgid ""
5238 "    /* Allocate a buffer aligned on a page boundary;\n"
5239 "       initial protection is PROT_READ | PROT_WRITE */\n"
5240 msgstr ""
5241 "    /* Allocate a buffer aligned on a page boundary;\n"
5242 "       initial protection is PROT_READ | PROT_WRITE */\n"
5243
5244 #. type: Plain text
5245 #: build/C/man2/mprotect.2:206
5246 #, no-wrap
5247 msgid ""
5248 "    buffer = memalign(pagesize, 4 * pagesize);\n"
5249 "    if (buffer == NULL)\n"
5250 "        handle_error(\"memalign\");\n"
5251 msgstr ""
5252 "    buffer = memalign(pagesize, 4 * pagesize);\n"
5253 "    if (buffer == NULL)\n"
5254 "        handle_error(\"memalign\");\n"
5255
5256 #. type: Plain text
5257 #: build/C/man2/mprotect.2:208
5258 #, no-wrap
5259 msgid "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
5260 msgstr "    printf(\"Start of region:        0x%lx\\en\", (long) buffer);\n"
5261
5262 #. type: Plain text
5263 #: build/C/man2/mprotect.2:212
5264 #, no-wrap
5265 msgid ""
5266 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
5267 "                PROT_READ) == -1)\n"
5268 "        handle_error(\"mprotect\");\n"
5269 msgstr ""
5270 "    if (mprotect(buffer + pagesize * 2, pagesize,\n"
5271 "                PROT_READ) == -1)\n"
5272 "        handle_error(\"mprotect\");\n"
5273
5274 #. type: Plain text
5275 #: build/C/man2/mprotect.2:215
5276 #, no-wrap
5277 msgid ""
5278 "    for (p = buffer ; ; )\n"
5279 "        *(p++) = \\(aqa\\(aq;\n"
5280 msgstr ""
5281 "    for (p = buffer ; ; )\n"
5282 "        *(p++) = \\(aqa\\(aq;\n"
5283
5284 #. type: Plain text
5285 #: build/C/man2/mprotect.2:219
5286 #, no-wrap
5287 msgid ""
5288 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
5289 "    exit(EXIT_SUCCESS);\n"
5290 "}\n"
5291 msgstr ""
5292 "    printf(\"Loop completed\\en\");     /* Should never happen */\n"
5293 "    exit(EXIT_SUCCESS);\n"
5294 "}\n"
5295
5296 #. type: Plain text
5297 #: build/C/man2/mprotect.2:223
5298 msgid "B<mmap>(2), B<sysconf>(3)"
5299 msgstr "B<mmap>(2), B<sysconf>(3)"
5300
5301 #. type: TH
5302 #: build/C/man2/mremap.2:31
5303 #, no-wrap
5304 msgid "MREMAP"
5305 msgstr "MREMAP"
5306
5307 #. type: TH
5308 #: build/C/man2/mremap.2:31
5309 #, no-wrap
5310 msgid "2010-06-10"
5311 msgstr "2010-06-10"
5312
5313 #. type: Plain text
5314 #: build/C/man2/mremap.2:34
5315 msgid "mremap - remap a virtual memory address"
5316 msgstr "mremap - 仮想メモリ・アドレスを再マッピングする"
5317
5318 #. type: Plain text
5319 #: build/C/man2/mremap.2:37
5320 #, no-wrap
5321 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
5322 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
5323
5324 #. type: Plain text
5325 #: build/C/man2/mremap.2:42
5326 #, no-wrap
5327 msgid ""
5328 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
5329 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
5330 msgstr ""
5331 "B<void *mremap(void *>I<old_address>B<, size_t >I<old_size>B<,>\n"
5332 "B<             size_t >I<new_size>B<, int >I<flags>B<, ... /* void *>I<new_address>B< */);>\n"
5333
5334 #. type: Plain text
5335 #: build/C/man2/mremap.2:48
5336 msgid ""
5337 "B<mremap>()  expands (or shrinks) an existing memory mapping, potentially "
5338 "moving it at the same time (controlled by the I<flags> argument and the "
5339 "available virtual address space)."
5340 msgstr ""
5341 "B<mremap>()  は既存のメモリ・マッピングの拡張 (または縮小) を行う。 同時に移"
5342 "動されることもある (I<flags> 引き数と利用可能な仮想アドレス空間によって決ま"
5343 "る)。"
5344
5345 #. type: Plain text
5346 #: build/C/man2/mremap.2:62
5347 msgid ""
5348 "I<old_address> is the old address of the virtual memory block that you want "
5349 "to expand (or shrink).  Note that I<old_address> has to be page aligned.  "
5350 "I<old_size> is the old size of the virtual memory block.  I<new_size> is the "
5351 "requested size of the virtual memory block after the resize.  An optional "
5352 "fifth argument, I<new_address>, may be provided; see the description of "
5353 "B<MREMAP_FIXED> below."
5354 msgstr ""
5355 "I<old_address> は拡張 (または縮小) しようとする仮想メモリ・ブロック の元のア"
5356 "ドレスである。I<old_address> はページ境界に合っていなければ ならない点に注意"
5357 "すること。I<old_size> は元の仮想メモリ・ブロックの サイズである。 "
5358 "I<new_size> は要求する変更後の仮想メモリ・ブロックのサイズである。 5 番目の引"
5359 "き数として I<new_address> を指定することができる。下記の B<MREMAP_FIXED> の説"
5360 "明を参照のこと。"
5361
5362 #. type: Plain text
5363 #: build/C/man2/mremap.2:74
5364 msgid ""
5365 "In Linux the memory is divided into pages.  A user process has (one or)  "
5366 "several linear virtual memory segments.  Each virtual memory segment has one "
5367 "or more mappings to real memory pages (in the page table).  Each virtual "
5368 "memory segment has its own protection (access rights), which may cause a "
5369 "segmentation violation if the memory is accessed incorrectly (e.g., writing "
5370 "to a read-only segment).  Accessing virtual memory outside of the segments "
5371 "will also cause a segmentation violation."
5372 msgstr ""
5373 "Linux ではメモリはページに分割される。ユーザー・プロセスは (一つまたは)  複数"
5374 "のリニアな仮想メモリセグメントを持つ。 それぞれの仮想メモリセグメントは一つ以"
5375 "上の実メモリ・ページ にマッピングされている (マッピング情報はページ・テーブル"
5376 "で管理される)。 仮想メモリセグメントにはセグメント毎の保護 (アクセス権) が設"
5377 "定されており、 メモリが不正にアクセスされた場合 (例えば読み込み専用のセグメン"
5378 "トに 書き込んだ場合)、セグメンテーション侵害 (segmentation violation) を 引き"
5379 "起こす。また、セグメント外の仮想メモリにアクセスした場合にも セグメンテーショ"
5380 "ン侵害が発生する。"
5381
5382 #. type: Plain text
5383 #: build/C/man2/mremap.2:82
5384 msgid ""
5385 "B<mremap>()  uses the Linux page table scheme.  B<mremap>()  changes the "
5386 "mapping between virtual addresses and memory pages.  This can be used to "
5387 "implement a very efficient B<realloc>(3)."
5388 msgstr ""
5389 "B<mremap>()  は Linux のページ・テーブル方式を使用する。 B<mremap>()  は仮想"
5390 "アドレスとメモリ・ページのマッピングを変更する。これは非常に効率的な "
5391 "B<realloc>(3)  を実装するのに使用されている。"
5392
5393 #. type: Plain text
5394 #: build/C/man2/mremap.2:84
5395 msgid "The I<flags> bit-mask argument may be 0, or include the following flag:"
5396 msgstr "I<flags> ビットマスク引数は 0 または以下のフラグを含む:"
5397
5398 #. type: TP
5399 #: build/C/man2/mremap.2:84
5400 #, no-wrap
5401 msgid "B<MREMAP_MAYMOVE>"
5402 msgstr "B<MREMAP_MAYMOVE>"
5403
5404 #. type: Plain text
5405 #: build/C/man2/mremap.2:96
5406 msgid ""
5407 "By default, if there is not sufficient space to expand a mapping at its "
5408 "current location, then B<mremap>()  fails.  If this flag is specified, then "
5409 "the kernel is permitted to relocate the mapping to a new virtual address, if "
5410 "necessary.  If the mapping is relocated, then absolute pointers into the old "
5411 "mapping location become invalid (offsets relative to the starting address of "
5412 "the mapping should be employed)."
5413 msgstr ""
5414 "デフォルトでは、現在の位置にマッピングを拡張するための 十分な空きがなければ "
5415 "B<mremap>()  は失敗する。 このフラグが指定されると、カーネルは必要があれば"
5416 "マッピングを 新しい仮想アドレスに再配置することができる マッピングが再配置さ"
5417 "れると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アド"
5418 "レスからの相対オフセットは有効のままである)。"
5419
5420 #. type: TP
5421 #: build/C/man2/mremap.2:96
5422 #, no-wrap
5423 msgid "B<MREMAP_FIXED> (since Linux 2.3.31)"
5424 msgstr "B<MREMAP_FIXED> (Linux 2.3.31 以降)"
5425
5426 #. type: Plain text
5427 #: build/C/man2/mremap.2:118
5428 msgid ""
5429 "This flag serves a similar purpose to the B<MAP_FIXED> flag of B<mmap>(2).  "
5430 "If this flag is specified, then B<mremap>()  accepts a fifth argument, "
5431 "I<void *new_address>, which specifies a page-aligned address to which the "
5432 "mapping must be moved.  Any previous mapping at the address range specified "
5433 "by I<new_address> and I<new_size> is unmapped.  If B<MREMAP_FIXED> is "
5434 "specified, then B<MREMAP_MAYMOVE> must also be specified."
5435 msgstr ""
5436 "このフラグは B<mmap>(2)  の B<MAP_FIXED> フラグと似たような目的で用いられ"
5437 "る。 このフラグが指定されると、 B<mremap>()  は 5 番目の引き数 I<void "
5438 "*new_address> を受け取り、この引数はマッピングが移動されるべきアドレスを指定"
5439 "する。 このアドレスはページ境界に合っていなければならない。 I<new_address> "
5440 "と I<new_size> で指定されるアドレス範囲に過去のマッピングがあった場合、 その"
5441 "マッピングはアンマップされる (unmapped)。 B<MREMAP_FIXED> を指定した場合は、 "
5442 "B<MREMAP_MAYMOVE> も指定しなければならない。"
5443
5444 #. type: Plain text
5445 #: build/C/man2/mremap.2:128
5446 msgid ""
5447 "If the memory segment specified by I<old_address> and I<old_size> is locked "
5448 "(using B<mlock>(2)  or similar), then this lock is maintained when the "
5449 "segment is resized and/or relocated.  As a consequence, the amount of memory "
5450 "locked by the process may change."
5451 msgstr ""
5452 "I<old_address> と I<old_size> で指定されるメモリセグメントが (B<mlock>(2)  や"
5453 "同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置され"
5454 "たりした時にロックも維持される。 その結果、プロセスによってロックされるメモリ"
5455 "の量は変化する。"
5456
5457 #. type: Plain text
5458 #: build/C/man2/mremap.2:136
5459 msgid ""
5460 "On success B<mremap>()  returns a pointer to the new virtual memory area.  "
5461 "On error, the value B<MAP_FAILED> (that is, I<(void\\ *)\\ -1>) is returned, "
5462 "and I<errno> is set appropriately."
5463 msgstr ""
5464 "成功した場合は B<mremap>()  は新しい仮想メモリ領域へのポインタを返す。 エラー"
5465 "の場合は B<MAP_FAILED> (すなわち I<(void\\ *)\\ -1>) が返され、 I<errno> が適"
5466 "切に設定される。"
5467
5468 #. type: Plain text
5469 #: build/C/man2/mremap.2:143
5470 msgid ""
5471 "The caller tried to expand a memory segment that is locked, but this was not "
5472 "possible without exceeding the B<RLIMIT_MEMLOCK> resource limit."
5473 msgstr ""
5474 "呼び出し元がロックされているメモリセグメントを拡張しようとしたが、 "
5475 "B<RLIMIT_MEMLOCK> リソース制限を越えずにこれを行うことができない。"
5476
5477 #. type: Plain text
5478 #: build/C/man2/mremap.2:152
5479 msgid ""
5480 "\"Segmentation fault.\" Some address in the range I<old_address> to "
5481 "I<old_address>+I<old_size> is an invalid virtual memory address for this "
5482 "process.  You can also get B<EFAULT> even if there exist mappings that cover "
5483 "the whole address space requested, but those mappings are of different types."
5484 msgstr ""
5485 "「セグメンテーション違反(segmentation fault)」 I<old_address> から "
5486 "I<old_address>+I<old_size> の 範囲のアドレスのどれかがこのプロセスにおいて不"
5487 "正な仮想メモリ・アドレスである。 たとえ要求したアドレス空間全体を含むような"
5488 "マッピングがあったとしても、 それらのマッピングが異なった型ならば B<EFAULT> "
5489 "を受け取るだろう。"
5490
5491 #. type: Plain text
5492 #: build/C/man2/mremap.2:180
5493 msgid ""
5494 "An invalid argument was given.  Possible causes are: I<old_address> was not "
5495 "page aligned; a value other than B<MREMAP_MAYMOVE> or B<MREMAP_FIXED> was "
5496 "specified in I<flags>; I<new_size> was zero; I<new_size> or I<new_address> "
5497 "was invalid; or the new address range specified by I<new_address> and "
5498 "I<new_size> overlapped the old address range specified by I<old_address> and "
5499 "I<old_size>; or B<MREMAP_FIXED> was specified without also specifying "
5500 "B<MREMAP_MAYMOVE>."
5501 msgstr ""
5502 "不正な引き数が与えられた。 可能性のある原因は以下の通りである: たいていは "
5503 "I<old_address> がページ境界に 合ってない; I<flags> に B<MREMAP_MAYMOVE> また"
5504 "は B<MREMAP_FIXED> 以外の値が指定されている; I<new_size> がゼロ; I<new_size> "
5505 "または I<new_address> の値が不正; I<new_address> と I<new_size> で指定される"
5506 "新しいアドレス範囲が I<old_address> と I<old_size> で指定される古いアドレス範"
5507 "囲と重なっている; B<MREMAP_FIXED> が指定されているが B<MREMAP_MAYMOVE> が指定"
5508 "されていない。"
5509
5510 #. type: Plain text
5511 #: build/C/man2/mremap.2:186
5512 msgid ""
5513 "The memory area cannot be expanded at the current virtual address, and the "
5514 "B<MREMAP_MAYMOVE> flag is not set in I<flags>.  Or, there is not enough "
5515 "(virtual) memory available."
5516 msgstr ""
5517 "現在の仮想アドレスではメモリ領域が拡張できず、 B<MREMAP_MAYMOVE> フラグが "
5518 "I<flags> に設定されていない。 または十分な (仮想) メモリが存在しない。"
5519
5520 #.  4.2BSD had a (never actually implemented)
5521 #.  .BR mremap (2)
5522 #.  call with completely different semantics.
5523 #. type: Plain text
5524 #: build/C/man2/mremap.2:192
5525 msgid ""
5526 "This call is Linux-specific, and should not be used in programs intended to "
5527 "be portable."
5528 msgstr ""
5529 "このコールは Linux 特有であり、移植を意図したプログラムで 使用すべきではな"
5530 "い。"
5531
5532 #. type: Plain text
5533 #: build/C/man2/mremap.2:200
5534 msgid ""
5535 "Prior to version 2.4, glibc did not expose the definition of "
5536 "B<MREMAP_FIXED>, and the prototype for B<mremap>()  did not allow for the "
5537 "I<new_address> argument."
5538 msgstr ""
5539 "バージョン 2.4 より前の glibc では、 B<MREMAP_FIXED> の定義は公開されておら"
5540 "ず、 B<mremap>()  のプロトタイプは I<new_address> 引き数を取らなかった。"
5541
5542 #. type: Plain text
5543 #: build/C/man2/mremap.2:209
5544 msgid ""
5545 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5546 "B<sbrk>(2), B<malloc>(3), B<realloc>(3)"
5547 msgstr ""
5548 "B<brk>(2), B<getpagesize>(2), B<getrlimit>(2), B<mlock>(2), B<mmap>(2), "
5549 "B<sbrk>(2), B<realloc>(3), B<malloc>(3)"
5550
5551 #. type: Plain text
5552 #: build/C/man2/mremap.2:214
5553 msgid ""
5554 "Your favorite OS text book for more information on paged memory.  (I<Modern "
5555 "Operating Systems> by Andrew S. Tanenbaum, I<Inside Linux> by Randolf "
5556 "Bentson, I<The Design of the UNIX Operating System> by Maurice J. Bach.)"
5557 msgstr ""
5558 "ページ分割されたメモリについてもっと詳しく知りたいならば あなたの好みの OS "
5559 "の\n"
5560 "教科書を参照すること。 (I<Modern Operating Systems> by Andrew S. Tanenbaum,\n"
5561 "I<Inside Linux> by Randolf Bentson, I<The Design of the UNIX Operating\n"
5562 "System> by Maurice J. Bach.)"
5563
5564 #. type: TH
5565 #: build/C/man2/msync.2:25
5566 #, no-wrap
5567 msgid "MSYNC"
5568 msgstr "MSYNC"
5569
5570 #. type: TH
5571 #: build/C/man2/msync.2:25 build/C/man2/remap_file_pages.2:26
5572 #, no-wrap
5573 msgid "2008-04-22"
5574 msgstr "2008-04-22"
5575
5576 #. type: Plain text
5577 #: build/C/man2/msync.2:28
5578 msgid "msync - synchronize a file with a memory map"
5579 msgstr "msync - ファイルをマップしたメモリと同期させる"
5580
5581 #. type: Plain text
5582 #: build/C/man2/msync.2:32
5583 msgid "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5584 msgstr "B<int msync(void *>I<addr>B<, size_t >I<length>B<, int >I<flags>B<);>"
5585
5586 #. type: Plain text
5587 #: build/C/man2/msync.2:48
5588 msgid ""
5589 "B<msync>()  flushes changes made to the in-core copy of a file that was "
5590 "mapped into memory using B<mmap>(2)  back to disk.  Without use of this call "
5591 "there is no guarantee that changes are written back before B<munmap>(2)  is "
5592 "called.  To be more precise, the part of the file that corresponds to the "
5593 "memory area starting at I<addr> and having length I<length> is updated."
5594 msgstr ""
5595 "B<msync>()  は B<mmap>(2)  を使ってメモリにマップされたファイルの、 メモリ上"
5596 "のコピーになされた変更をディスクに反映させる。 この関数を使用しないと、 "
5597 "B<munmap>(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、"
5598 "ファイルのうち I<addr> から始まり長さ I<length> のメモリ領域に対応する部分が"
5599 "更新される。"
5600
5601 #. type: Plain text
5602 #: build/C/man2/msync.2:68
5603 msgid ""
5604 "The I<flags> argument may have the bits B<MS_ASYNC>, B<MS_SYNC>, and "
5605 "B<MS_INVALIDATE> set, but not both B<MS_ASYNC> and B<MS_SYNC>.  B<MS_ASYNC> "
5606 "specifies that an update be scheduled, but the call returns immediately.  "
5607 "B<MS_SYNC> asks for an update and waits for it to complete.  "
5608 "B<MS_INVALIDATE> asks to invalidate other mappings of the same file (so that "
5609 "they can be updated with the fresh values just written)."
5610 msgstr ""
5611 "I<flags> 引数にはビット B<MS_ASYNC>, B<MS_SYNC>, B<MS_INVALIDATE> を設定する"
5612 "ことができるが、 B<MS_ASYNC> と B<MS_SYNC> を同時に指定することはできない。 "
5613 "B<MS_ASYNC> は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 "
5614 "B<MS_SYNC> は更新を要求し、更新が完了するまで待つ。 B<MS_INVALIDATE> は(たっ"
5615 "た今書き込んだ新しい値でマッピングを更新することができるように)  同じファイル"
5616 "に対する他のマッピングを無効にすることを要求する。"
5617
5618 #. type: Plain text
5619 #: build/C/man2/msync.2:73
5620 msgid ""
5621 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
5622 "appropriately."
5623 msgstr ""
5624 "成功した場合、 0 が返る。エラーの場合、 -1 が返り、 I<errno> が適切に設定され"
5625 "る。"
5626
5627 #. type: TP
5628 #: build/C/man2/msync.2:74
5629 #, no-wrap
5630 msgid "B<EBUSY>"
5631 msgstr "B<EBUSY>"
5632
5633 #. type: Plain text
5634 #: build/C/man2/msync.2:80
5635 msgid ""
5636 "B<MS_INVALIDATE> was specified in I<flags>, and a memory lock exists for the "
5637 "specified address range."
5638 msgstr ""
5639 "I flags に B<MS_INVALIDATE> が指定されたが、指定されたアドレス範囲にロックが"
5640 "存在する。"
5641
5642 #. type: Plain text
5643 #: build/C/man2/msync.2:93
5644 msgid ""
5645 "I<addr> is not a multiple of PAGESIZE; or any bit other than B<MS_ASYNC> | "
5646 "B<MS_INVALIDATE> | B<MS_SYNC> is set in I<flags>; or both B<MS_SYNC> and "
5647 "B<MS_ASYNC> are set in I<flags>."
5648 msgstr ""
5649 "I<addr> が PAGESIZE の倍数でない。または、 I<flags> に B<MS_ASYNC>、"
5650 "B<MS_INVALIDATE>、B<MS_SYNC> 以外のビットが設定された。 または、 I<flags> に "
5651 "B<MS_SYNC> と B<MS_ASYNC> の両方が設定された。"
5652
5653 #. type: Plain text
5654 #: build/C/man2/msync.2:96
5655 msgid "The indicated memory (or part of it) was not mapped."
5656 msgstr "指定されたメモリ (またはその一部) がマップされていない。"
5657
5658 #. type: Plain text
5659 #: build/C/man2/msync.2:98 build/C/man3/posix_fallocate.3:103
5660 #: build/C/man3/shm_open.3:251 build/C/man7/shm_overview.7:103
5661 msgid "POSIX.1-2001."
5662 msgstr "POSIX.1-2001."
5663
5664 #. type: Plain text
5665 #: build/C/man2/msync.2:105
5666 msgid ""
5667 "This call was introduced in Linux 1.3.21, and then used B<EFAULT> instead of "
5668 "B<ENOMEM>.  In Linux 2.4.19 this was changed to the POSIX value B<ENOMEM>."
5669 msgstr ""
5670 "この関数は Linux 1.3.21 で導入されたが、 B<ENOMEM> ではなく B<EFAULT> が使わ"
5671 "れていた。 これは Linux 2.4.19 で POSIX における値 B<ENOMEM> に変更された。"
5672
5673 #.  POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
5674 #.  -1: unavailable, 0: ask using sysconf().
5675 #.  glibc defines them to 1.
5676 #. type: Plain text
5677 #: build/C/man2/msync.2:118
5678 msgid ""
5679 "On POSIX systems on which B<msync>()  is available, both "
5680 "B<_POSIX_MAPPED_FILES> and B<_POSIX_SYNCHRONIZED_IO> are defined in "
5681 "I<E<lt>unistd.hE<gt>> to a value greater than 0.  (See also B<sysconf>(3).)"
5682 msgstr ""
5683 "B<msync>()  が使用可能な POSIX システムでは B<_POSIX_MAPPED_FILES> と "
5684 "B<_POSIX_SYNCHRONIZED_IO> の両方が I<E<lt>unistd.hE<gt>> で 0 より大きい値に"
5685 "定義される。 (B<sysconf>(3)  を参照すること。 )"
5686
5687 #. type: TP
5688 #: build/C/man2/msync.2:120 build/C/man7/shm_overview.7:46
5689 #, no-wrap
5690 msgid "B<mmap>(2)"
5691 msgstr "B<mmap>(2)"
5692
5693 #. type: TH
5694 #: build/C/man3/mtrace.3:23
5695 #, no-wrap
5696 msgid "MTRACE"
5697 msgstr "MTRACE"
5698
5699 #. type: Plain text
5700 #: build/C/man3/mtrace.3:26
5701 msgid "mtrace, muntrace - malloc tracing"
5702 msgstr "mtrace, muntrace - malloc のトレース"
5703
5704 #. type: Plain text
5705 #: build/C/man3/mtrace.3:28
5706 msgid "B<#include E<lt>mcheck.hE<gt>>"
5707 msgstr "B<#include E<lt>mcheck.hE<gt>>"
5708
5709 #. type: Plain text
5710 #: build/C/man3/mtrace.3:30
5711 msgid "B<void mtrace(void);>"
5712 msgstr "B<void mtrace(void);>"
5713
5714 #. type: Plain text
5715 #: build/C/man3/mtrace.3:32
5716 msgid "B<void muntrace(void);>"
5717 msgstr "B<void muntrace(void);>"
5718
5719 #. type: Plain text
5720 #: build/C/man3/mtrace.3:44
5721 msgid ""
5722 "The B<mtrace>()  function installs hook functions for the memory-allocation "
5723 "functions (B<malloc>(3), B<realloc>(3)  B<memalign>(3), B<free>(3)).  These "
5724 "hook functions record tracing information about memory allocation and "
5725 "deallocation.  The tracing information can be used to discover memory leaks "
5726 "and attempts to free nonallocated memory in a program."
5727 msgstr ""
5728
5729 #. type: Plain text
5730 #: build/C/man3/mtrace.3:55
5731 msgid ""
5732 "The B<muntrace>()  function disables the hook functions installed by "
5733 "B<mtrace>(), so that tracing information is no longer recorded for the "
5734 "memory-allocation functions.  If no hook functions were successfully "
5735 "installed by B<mtrace>(), B<muntrace>()  does nothing."
5736 msgstr ""
5737
5738 #. type: Plain text
5739 #: build/C/man3/mtrace.3:63
5740 msgid ""
5741 "When B<mtrace>(3)  is called, it checks the value of the environment "
5742 "variable B<MALLOC_TRACE>, which should contain the pathname of a file in "
5743 "which the tracing information is to be recorded.  If the pathname is "
5744 "successfully opened, it is truncated to zero length."
5745 msgstr ""
5746
5747 #. type: Plain text
5748 #: build/C/man3/mtrace.3:76
5749 msgid ""
5750 "If B<MALLOC_TRACE> is not set, or the pathname it specifies is invalid or "
5751 "not writable, then no hook functions are installed, and B<mtrace>()  has no "
5752 "effect.  In set-user-ID and set-group-ID programs, B<MALLOC_TRACE> is "
5753 "ignored, and B<mtrace>()  has no effect."
5754 msgstr ""
5755
5756 #. type: Plain text
5757 #: build/C/man3/mtrace.3:84
5758 msgid ""
5759 "In normal usage, B<mtrace>()  is called once at the start of execution of a "
5760 "program, and B<muntrace>()  is never called."
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man3/mtrace.3:94
5765 msgid ""
5766 "The tracing output produced after a call to B<mtrace>()  is textual, but not "
5767 "designed to be human readable.  The GNU C library provides a Perl script, "
5768 "B<mtrace>(1), that interprets the trace log and produces human-readable "
5769 "output.  For best results, the traced program should be compiled with "
5770 "debugging enabled, so that line-number information is recorded in the "
5771 "executable."
5772 msgstr ""
5773
5774 #. type: Plain text
5775 #: build/C/man3/mtrace.3:100
5776 msgid ""
5777 "The tracing performed by B<mtrace>()  incurs a performance penalty (if "
5778 "B<MALLOC_TRACE> points to a valid, writable pathname)."
5779 msgstr ""
5780
5781 #. type: Plain text
5782 #: build/C/man3/mtrace.3:106
5783 msgid ""
5784 "The line-number information produced by B<mtrace>(1)  is not always precise: "
5785 "the line number references may refer to the previous or following (non-"
5786 "blank)  line of the source code."
5787 msgstr ""
5788
5789 #. type: Plain text
5790 #: build/C/man3/mtrace.3:113
5791 msgid ""
5792 "The shell session below demonstrates the use of the B<mtrace>()  function "
5793 "and the B<mtrace>(1)  command in a program that has memory leaks at two "
5794 "different locations.  The demonstration uses the following program:"
5795 msgstr ""
5796
5797 #. type: Plain text
5798 #: build/C/man3/mtrace.3:120
5799 #, no-wrap
5800 msgid ""
5801 "$ B<cat t_mtrace.c>\n"
5802 "#include E<lt>mcheck.hE<gt>\n"
5803 "#include E<lt>stdlib.hE<gt>\n"
5804 "#include E<lt>stdio.hE<gt>\n"
5805 msgstr ""
5806 "$ B<cat t_mtrace.c>\n"
5807 "#include E<lt>mcheck.hE<gt>\n"
5808 "#include E<lt>stdlib.hE<gt>\n"
5809 "#include E<lt>stdio.hE<gt>\n"
5810
5811 #. type: Plain text
5812 #: build/C/man3/mtrace.3:125
5813 #, no-wrap
5814 msgid ""
5815 "int\n"
5816 "main(int argc, char *argv[])\n"
5817 "{\n"
5818 "    int j;\n"
5819 msgstr ""
5820 "int\n"
5821 "main(int argc, char *argv[])\n"
5822 "{\n"
5823 "    int j;\n"
5824
5825 #. type: Plain text
5826 #: build/C/man3/mtrace.3:127
5827 #, no-wrap
5828 msgid "    mtrace();\n"
5829 msgstr "    mtrace();\n"
5830
5831 #. type: Plain text
5832 #: build/C/man3/mtrace.3:130
5833 #, no-wrap
5834 msgid ""
5835 "    for (j = 0; j E<lt> 2; j++)\n"
5836 "        malloc(100);            /* Never freed--a memory leak */\n"
5837 msgstr ""
5838 "    for (j = 0; j E<lt> 2; j++)\n"
5839 "        malloc(100);            /* Never freed--a memory leak */\n"
5840
5841 #. type: Plain text
5842 #: build/C/man3/mtrace.3:134
5843 #, no-wrap
5844 msgid ""
5845 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
5846 "    exit(EXIT_SUCCESS);\n"
5847 "}\n"
5848 msgstr ""
5849 "    calloc(16, 16);             /* Never freed--a memory leak */\n"
5850 "    exit(EXIT_SUCCESS);\n"
5851 "}\n"
5852
5853 #. type: Plain text
5854 #: build/C/man3/mtrace.3:140
5855 msgid ""
5856 "When we run the program as follows, we see that B<mtrace>()  diagnosed "
5857 "memory leaks at two different locations in the program:"
5858 msgstr ""
5859
5860 #. type: Plain text
5861 #: build/C/man3/mtrace.3:153
5862 #, no-wrap
5863 msgid ""
5864 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5865 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5866 "$ B<./t_mtrace>\n"
5867 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5868 "Memory not freed:\n"
5869 "-----------------\n"
5870 "   Address     Size     Caller\n"
5871 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
5872 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
5873 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
5874 msgstr ""
5875 "$ B<cc -g t_mtrace.c -o t_mtrace>\n"
5876 "$ B<export MALLOC_TRACE=/tmp/t>\n"
5877 "$ B<./t_mtrace>\n"
5878 "$ B<mtrace ./t_mtrace $MALLOC_TRACE>\n"
5879 "Memory not freed:\n"
5880 "-----------------\n"
5881 "   Address     Size     Caller\n"
5882 "0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12\n"
5883 "0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12\n"
5884 "0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16\n"
5885
5886 #. type: Plain text
5887 #: build/C/man3/mtrace.3:165
5888 msgid ""
5889 "The first two messages about unfreed memory correspond to the two B<malloc>"
5890 "(3)  calls inside the I<for> loop.  The final message corresponds to the "
5891 "call to B<calloc>(3)  (which in turn calls B<malloc>(3))."
5892 msgstr ""
5893
5894 #. type: Plain text
5895 #: build/C/man3/mtrace.3:170
5896 msgid "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5897 msgstr "B<mtrace>(1), B<malloc>(3), B<malloc_hook>(3), B<mcheck>(3)"
5898
5899 #. type: TH
5900 #: build/C/man2/posix_fadvise.2:27
5901 #, no-wrap
5902 msgid "POSIX_FADVISE"
5903 msgstr "POSIX_FADVISE"
5904
5905 #. type: TH
5906 #: build/C/man2/posix_fadvise.2:27 build/C/man2/sync_file_range.2:30
5907 #, no-wrap
5908 msgid "2010-10-09"
5909 msgstr "2010-10-09"
5910
5911 #. type: Plain text
5912 #: build/C/man2/posix_fadvise.2:30
5913 msgid "posix_fadvise - predeclare an access pattern for file data"
5914 msgstr "posix_fadvise - ファイルデータのアクセスパターンをあらかじめ宣言する"
5915
5916 #. type: Plain text
5917 #: build/C/man2/posix_fadvise.2:33 build/C/man3/posix_fallocate.3:29
5918 #, no-wrap
5919 msgid "B<#include E<lt>fcntl.hE<gt>>\n"
5920 msgstr "B<#include E<lt>fcntl.hE<gt>>\n"
5921
5922 #. type: Plain text
5923 #: build/C/man2/posix_fadvise.2:36
5924 #, no-wrap
5925 msgid "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5926 msgstr "B<int posix_fadvise(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<, int >I<advice>B<);>\n"
5927
5928 #. type: Plain text
5929 #: build/C/man2/posix_fadvise.2:45
5930 msgid "B<posix_fadvise>():"
5931 msgstr "B<posix_fadvise>():"
5932
5933 #. type: Plain text
5934 #: build/C/man2/posix_fadvise.2:47 build/C/man3/posix_fallocate.3:42
5935 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5936 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
5937
5938 #. type: Plain text
5939 #: build/C/man2/posix_fadvise.2:55
5940 msgid ""
5941 "Programs can use B<posix_fadvise>()  to announce an intention to access file "
5942 "data in a specific pattern in the future, thus allowing the kernel to "
5943 "perform appropriate optimizations."
5944 msgstr ""
5945 "プログラムは、将来特定のパターンでファイルデータに アクセスする意思を伝えるた"
5946 "めに B<posix_fadvise>()  を使うことができる。 これにより、カーネルが適切な最"
5947 "適化を実行することが可能になる。"
5948
5949 #. type: Plain text
5950 #: build/C/man2/posix_fadvise.2:62
5951 msgid ""
5952 "The I<advice> applies to a (not necessarily existent) region starting at "
5953 "I<offset> and extending for I<len> bytes (or until the end of the file if "
5954 "I<len> is 0) within the file referred to by I<fd>.  The I<advice> is not "
5955 "binding; it merely constitutes an expectation on behalf of the application."
5956 msgstr ""
5957 "I<advice> は I<fd> が参照しているファイルの I<offset> から始まる I<len> バ"
5958 "イ\n"
5959 "トの範囲内 (I<len> が 0 の場合はファイルの終りまで) の (必ずしも存在しない)\n"
5960 "領域に適用される。 I<advice> は義務づけではない。 I<advice> は単にアプリ"
5961 "ケー\n"
5962 "ションのために可能性を構成するだけである。"
5963
5964 #. type: Plain text
5965 #: build/C/man2/posix_fadvise.2:64
5966 msgid "Permissible values for I<advice> include:"
5967 msgstr "I<advice> に許される値には、以下のものが含まれる:"
5968
5969 #. type: TP
5970 #: build/C/man2/posix_fadvise.2:64
5971 #, no-wrap
5972 msgid "B<POSIX_FADV_NORMAL>"
5973 msgstr "B<POSIX_FADV_NORMAL>"
5974
5975 #. type: Plain text
5976 #: build/C/man2/posix_fadvise.2:70
5977 msgid ""
5978 "Indicates that the application has no advice to give about its access "
5979 "pattern for the specified data.  If no advice is given for an open file, "
5980 "this is the default assumption."
5981 msgstr ""
5982 "指定されたデータのアクセスパターンを指示するアドバイスを アプリケーションが何"
5983 "も持っていないことを示す。 オープンされたファイルにアドバイスが指定されない場"
5984 "合、 これがデフォルトで仮定される。"
5985
5986 #. type: TP
5987 #: build/C/man2/posix_fadvise.2:70
5988 #, no-wrap
5989 msgid "B<POSIX_FADV_SEQUENTIAL>"
5990 msgstr "B<POSIX_FADV_SEQUENTIAL>"
5991
5992 #. type: Plain text
5993 #: build/C/man2/posix_fadvise.2:74
5994 msgid ""
5995 "The application expects to access the specified data sequentially (with "
5996 "lower offsets read before higher ones)."
5997 msgstr ""
5998 "アプリケーションは指定されたデータがシーケンシャルに (大きなオフセットの前に"
5999 "小さなオフセットのデータを読むように)  アクセスされることを期待する。"
6000
6001 #. type: TP
6002 #: build/C/man2/posix_fadvise.2:74
6003 #, no-wrap
6004 msgid "B<POSIX_FADV_RANDOM>"
6005 msgstr "B<POSIX_FADV_RANDOM>"
6006
6007 #. type: Plain text
6008 #: build/C/man2/posix_fadvise.2:77
6009 msgid "The specified data will be accessed in random order."
6010 msgstr "指定されたデータがランダムな順番でアクセスされる。"
6011
6012 #. type: TP
6013 #: build/C/man2/posix_fadvise.2:77
6014 #, no-wrap
6015 msgid "B<POSIX_FADV_NOREUSE>"
6016 msgstr "B<POSIX_FADV_NOREUSE>"
6017
6018 #. type: Plain text
6019 #: build/C/man2/posix_fadvise.2:80
6020 msgid "The specified data will be accessed only once."
6021 msgstr "指定されたデータは 1 度しかアクセスされない。"
6022
6023 #. type: TP
6024 #: build/C/man2/posix_fadvise.2:80
6025 #, no-wrap
6026 msgid "B<POSIX_FADV_WILLNEED>"
6027 msgstr "B<POSIX_FADV_WILLNEED>"
6028
6029 #. type: Plain text
6030 #: build/C/man2/posix_fadvise.2:83
6031 msgid "The specified data will be accessed in the near future."
6032 msgstr "指定されたデータは近い将来アクセスされる。"
6033
6034 #. type: TP
6035 #: build/C/man2/posix_fadvise.2:83
6036 #, no-wrap
6037 msgid "B<POSIX_FADV_DONTNEED>"
6038 msgstr "B<POSIX_FADV_DONTNEED>"
6039
6040 #. type: Plain text
6041 #: build/C/man2/posix_fadvise.2:86
6042 msgid "The specified data will not be accessed in the near future."
6043 msgstr "指定されたデータは近い将来アクセスされない。"
6044
6045 #. type: Plain text
6046 #: build/C/man2/posix_fadvise.2:89
6047 msgid "On success, zero is returned.  On error, an error number is returned."
6048 msgstr "成功した場合は 0 が返される。 失敗した場合はエラー番号が返される。"
6049
6050 #. type: Plain text
6051 #: build/C/man2/posix_fadvise.2:93
6052 msgid "The I<fd> argument was not a valid file descriptor."
6053 msgstr "I<fd> 引き数が有効なファイルディスクリプタでない。"
6054
6055 #. type: Plain text
6056 #: build/C/man2/posix_fadvise.2:96
6057 msgid "An invalid value was specified for I<advice>."
6058 msgstr "無効な値が I<advice> に指定された。"
6059
6060 #. type: Plain text
6061 #: build/C/man2/posix_fadvise.2:103
6062 msgid ""
6063 "The specified file descriptor refers to a pipe or FIFO.  (Linux actually "
6064 "returns B<EINVAL> in this case.)"
6065 msgstr ""
6066 "指定されたファイルディスクリプタがパイプまたは FIFO を参照している (この場"
6067 "合、Linux は実際には B<EINVAL> を返す)。"
6068
6069 #.  of fadvise64_64()
6070 #. type: Plain text
6071 #: build/C/man2/posix_fadvise.2:111
6072 msgid ""
6073 "Kernel support first appeared in Linux 2.5.60; the underlying system call is "
6074 "called B<fadvise64>().  Library support has been provided since glibc "
6075 "version 2.2, via the wrapper function B<posix_fadvise>()."
6076 msgstr ""
6077 "カーネルによるサポートは Linux 2.5.60 で最初に登場し、\n"
6078 "対応するシステムコールは B<fadvise64>() という名前である。\n"
6079 "ライブラリによるサポートは glibc バージョン 2.2 以降で提供されており、\n"
6080 "ラッパー関数は B<posix_fadvise>() という名前である。"
6081
6082 #. type: Plain text
6083 #: build/C/man2/posix_fadvise.2:120
6084 msgid ""
6085 "POSIX.1-2001.  Note that the type of the I<len> argument was changed from "
6086 "I<size_t> to I<off_t> in POSIX.1-2003 TC1."
6087 msgstr ""
6088 "POSIX.1-2001.  I<len> 引き数の型が POSIX.1-2003 TC1 において I<size_t> から "
6089 "I<off_t> に変更された点に注意すること。"
6090
6091 #. type: Plain text
6092 #: build/C/man2/posix_fadvise.2:126
6093 msgid ""
6094 "Under Linux, B<POSIX_FADV_NORMAL> sets the readahead window to the default "
6095 "size for the backing device; B<POSIX_FADV_SEQUENTIAL> doubles this size, and "
6096 "B<POSIX_FADV_RANDOM> disables file readahead entirely.  These changes affect "
6097 "the entire file, not just the specified region (but other open file handles "
6098 "to the same file are unaffected)."
6099 msgstr ""
6100 "Linux では、B<POSIX_FADV_NORMAL> はバッキングデバイスの デフォルトサイズに先"
6101 "読み (readahead) ウインドウを設定する。 B<POSIX_FADV_SEQUENTIAL> はこのサイズ"
6102 "を 2 倍し、 B<POSIX_FADV_RANDOM> は先読みを全く無効にする。 これらの変更は"
6103 "ファイル全体に影響し、指定された領域のみに影響するわけではない (しかし同じ"
6104 "ファイルに対する他のオープンファイルハンドルは影響を受けない)。"
6105
6106 #. type: Plain text
6107 #: build/C/man2/posix_fadvise.2:133
6108 msgid ""
6109 "B<POSIX_FADV_WILLNEED> initiates a nonblocking read of the specified region "
6110 "into the page cache.  The amount of data read may be decreased by the kernel "
6111 "depending on virtual memory load.  (A few megabytes will usually be fully "
6112 "satisfied, and more is rarely useful.)"
6113 msgstr ""
6114 "B<POSIX_FADV_WILLNEED> は、 ページキャッシュに指定領域のブロックされない読み"
6115 "込みを開始する。 読み込まれるデータの総量は、 仮想メモリの負荷に依ってカーネ"
6116 "ルが減らすかもしれない (数メガバイトであれば通常は全く十分であり、 それより多"
6117 "くてもめったに役に立たない)。"
6118
6119 #. type: Plain text
6120 #: build/C/man2/posix_fadvise.2:137
6121 msgid ""
6122 "In kernels before 2.6.18, B<POSIX_FADV_NOREUSE> had the same semantics as "
6123 "B<POSIX_FADV_WILLNEED>.  This was probably a bug; since kernel 2.6.18, this "
6124 "flag is a no-op."
6125 msgstr ""
6126 "2.6.18 より前のカーネルでは、B<POSIX_FADV_NOREUSE> は B<POSIX_FADV_WILLNEED> "
6127 "と同じ意味であった。 これは多分バグであった。 カーネル 2.6.18 以降では、この"
6128 "フラグは何も行わない。"
6129
6130 #. type: Plain text
6131 #: build/C/man2/posix_fadvise.2:145
6132 msgid ""
6133 "B<POSIX_FADV_DONTNEED> attempts to free cached pages associated with the "
6134 "specified region.  This is useful, for example, while streaming large "
6135 "files.  A program may periodically request the kernel to free cached data "
6136 "that has already been used, so that more useful cached pages are not "
6137 "discarded instead."
6138 msgstr ""
6139 "B<POSIX_FADV_DONTNEED> は指定された領域に関連付けられた キャッシュページを解"
6140 "放しようとする。 例えば、これは大きなファイルをストリーミングするときに役立"
6141 "つ。 プログラムは、使用済みのキャッシュされたデータを解放するように、 定期的"
6142 "にカーネルに要求するかもしれない。 そうすることにより、さらに有効なキャッシュ"
6143 "されたページが、 代わりに破棄されることはない。"
6144
6145 #. type: Plain text
6146 #: build/C/man2/posix_fadvise.2:153
6147 msgid ""
6148 "Pages that have not yet been written out will be unaffected, so if the "
6149 "application wishes to guarantee that pages will be released, it should call "
6150 "B<fsync>(2)  or B<fdatasync>(2)  first."
6151 msgstr ""
6152 "まだ書き出されていないページは影響を受けないので、 そのページの解放が保証され"
6153 "ることをアプリケーションが望んでいるなら、 最初に B<fsync>(2)  または "
6154 "B<fdatasync>(2)  を呼ぶべきである。"
6155
6156 #. type: SS
6157 #: build/C/man2/posix_fadvise.2:153
6158 #, no-wrap
6159 msgid "arm_fadvise()"
6160 msgstr "arm_fadvise()"
6161
6162 #. type: Plain text
6163 #: build/C/man2/posix_fadvise.2:165
6164 msgid ""
6165 "The ARM architecture needs 64-bit arguments to be aligned in a suitable pair "
6166 "of registers.  On this architecture, the call signature of B<posix_fadvise>"
6167 "()  is flawed, since it forces a register to be wasted as padding between "
6168 "the I<fd> and I<len> arguments.  Therefore, since Linux 2.6.14, ARM defines "
6169 "a different system call that orders the arguments suitably:"
6170 msgstr ""
6171
6172 #. type: Plain text
6173 #: build/C/man2/posix_fadvise.2:170
6174 #, no-wrap
6175 msgid ""
6176 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
6177 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
6178 msgstr ""
6179 "B<long arm_fadvise64_64(int >I<fd>B<, int >I<advice>B<,>\n"
6180 "B<                      loff_t >I<offset>B<, loff_t >I<len>B<);>\n"
6181
6182 #.  No ARM support in glibc.
6183 #. type: Plain text
6184 #: build/C/man2/posix_fadvise.2:177
6185 msgid ""
6186 "The behavior of this system call is otherwise exactly the same as "
6187 "B<posix_fadvise>().  No library support is provided for this system call in "
6188 "glibc."
6189 msgstr ""
6190
6191 #. type: Plain text
6192 #: build/C/man2/posix_fadvise.2:182
6193 msgid ""
6194 "In kernels before 2.6.6, if I<len> was specified as 0, then this was "
6195 "interpreted literally as \"zero bytes\", rather than as meaning \"all bytes "
6196 "through to the end of the file\"."
6197 msgstr ""
6198 "2.6.6 より前のカーネルでは、 I<len> に 0 が指定された場合、 「ファイルの終り"
6199 "までの全てのバイト」という意味ではなく、 文字通り「0 バイト」として解釈されて"
6200 "いた。"
6201
6202 #.  FIXME . Write a posix_fadvise(3) page.
6203 #. type: Plain text
6204 #: build/C/man2/posix_fadvise.2:188
6205 msgid ""
6206 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3), "
6207 "B<posix_madvise>(3)"
6208 msgstr ""
6209 "B<readahead>(2), B<sync_file_range>(2), B<posix_fallocate>(3),\n"
6210 "B<posix_madvise>(3)"
6211
6212 #. type: TH
6213 #: build/C/man3/posix_fallocate.3:23
6214 #, no-wrap
6215 msgid "POSIX_FALLOCATE"
6216 msgstr "POSIX_FALLOCATE"
6217
6218 #. type: TH
6219 #: build/C/man3/posix_fallocate.3:23
6220 #, no-wrap
6221 msgid "2010-09-20"
6222 msgstr "2010-09-20"
6223
6224 #. type: Plain text
6225 #: build/C/man3/posix_fallocate.3:26
6226 msgid "posix_fallocate - allocate file space"
6227 msgstr "posix_fallocate - ファイルのスペースを確保する"
6228
6229 #. type: Plain text
6230 #: build/C/man3/posix_fallocate.3:31
6231 #, no-wrap
6232 msgid "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
6233 msgstr "B<int posix_fallocate(int >I<fd>B<, off_t >I<offset>B<, off_t >I<len>B<);>\n"
6234
6235 #. type: Plain text
6236 #: build/C/man3/posix_fallocate.3:40
6237 msgid "B<posix_fallocate>():"
6238 msgstr "B<posix_fallocate>():"
6239
6240 #. type: Plain text
6241 #: build/C/man3/posix_fallocate.3:59
6242 msgid ""
6243 "The function B<posix_fallocate>()  ensures that disk space is allocated for "
6244 "the file referred to by the descriptor I<fd> for the bytes in the range "
6245 "starting at I<offset> and continuing for I<len> bytes.  After a successful "
6246 "call to B<posix_fallocate>(), subsequent writes to bytes in the specified "
6247 "range are guaranteed not to fail because of lack of disk space."
6248 msgstr ""
6249 "関数 B<posix_fallocate>()  は、ディスクリプタ I<fd> で参照されるファイルに対"
6250 "して、ディスクスペースを確実に確保する。 ディスクスペースは I<offset> から始"
6251 "まる I<len> バイトの範囲のバイトである。 B<posix_fallocate>()  の呼び出しが成"
6252 "功した後、指定された範囲のバイトに対する書き込みは、 ディスクスペースの不足で"
6253 "失敗しないことが保証される。"
6254
6255 #. type: Plain text
6256 #: build/C/man3/posix_fallocate.3:64
6257 msgid ""
6258 "If the size of the file is less than I<offset>+I<len>, then the file is "
6259 "increased to this size; otherwise the file size is left unchanged."
6260 msgstr ""
6261 "ファイルのサイズが I<offset>+I<len> より小さい場合、ファイルはこのサイズにな"
6262 "るように拡大される。 それ以外の場合、ファイルサイズは変わらない。"
6263
6264 #. type: Plain text
6265 #: build/C/man3/posix_fallocate.3:70
6266 msgid ""
6267 "B<posix_fallocate>()  returns zero on success, or an error number on "
6268 "failure.  Note that I<errno> is not set."
6269 msgstr ""
6270 "B<posix_fallocate>()  は成功した場合、0 を返す。 失敗した場合、エラー番号を返"
6271 "す。 I<errno> が設定されない点に注意すること。"
6272
6273 #. type: Plain text
6274 #: build/C/man3/posix_fallocate.3:79
6275 msgid "I<offset+len> exceeds the maximum file size."
6276 msgstr "I<offset+len> が最大ファイルサイズを超えている。"
6277
6278 #. type: Plain text
6279 #: build/C/man3/posix_fallocate.3:89
6280 msgid "I<fd> does not refer to a regular file."
6281 msgstr "I<fd> が通常のファイルとして参照されていない。"
6282
6283 #. type: Plain text
6284 #: build/C/man3/posix_fallocate.3:98
6285 msgid "I<fd> refers to a pipe."
6286 msgstr "I<fd> がパイプを参照している。"
6287
6288 #. type: Plain text
6289 #: build/C/man3/posix_fallocate.3:101
6290 msgid "B<posix_fallocate>()  is available since glibc 2.1.94."
6291 msgstr "B<posix_fallocate>()  は glibc 2.1.94 以降で利用可能である。"
6292
6293 #. type: Plain text
6294 #: build/C/man3/posix_fallocate.3:126
6295 msgid ""
6296 "POSIX.1-2008 says that an implementation I<shall> give the B<EINVAL> error "
6297 "if I<len> was 0, or I<offset> was less than 0.  POSIX.1-2001 says that an "
6298 "implementation I<shall> give the B<EINVAL> error if I<len> is less than 0, "
6299 "or I<offset> was less than 0, and I<may> give the error if I<len> equals "
6300 "zero."
6301 msgstr ""
6302 "POSIX.1-2008 では、 I<len> が 0 の場合、もしくは I<offset> が 0 未満の場合、 "
6303 "B<EINVAL> エラーを返すものとされている。 POSIX.1-2001 では、 I<len> が 0 未満"
6304 "の場合、もしくは I<offset> が 0 未満の場合、 B<EINVAL> エラーを返すものとされ"
6305 "ている。また、 I<len> が 0 の場合、 B<EINVAL> エラーを返してもよいとされてい"
6306 "る。"
6307
6308 #. type: Plain text
6309 #: build/C/man3/posix_fallocate.3:130
6310 msgid "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
6311 msgstr "B<fallocate>(2), B<lseek>(2), B<posix_fadvise>(2)"
6312
6313 #. type: TH
6314 #: build/C/man3/posix_memalign.3:28
6315 #, no-wrap
6316 msgid "POSIX_MEMALIGN"
6317 msgstr "POSIX_MEMALIGN"
6318
6319 #. type: TH
6320 #: build/C/man3/posix_memalign.3:28
6321 #, no-wrap
6322 msgid "2012-03-23"
6323 msgstr "2012-03-23"
6324
6325 #. type: Plain text
6326 #: build/C/man3/posix_memalign.3:31
6327 msgid ""
6328 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - Allocate aligned "
6329 "memory"
6330 msgstr ""
6331 "posix_memalign, aligned_alloc, memalign, valloc, pvalloc - アラインメント\n"
6332 "されたメモリの割り当てを行う"
6333
6334 #. type: Plain text
6335 #: build/C/man3/posix_memalign.3:38
6336 #, no-wrap
6337 msgid ""
6338 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
6339 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
6340 "B<void *valloc(size_t >I<size>B<);>\n"
6341 msgstr ""
6342 "B<int posix_memalign(void **>I<memptr>B<, size_t >I<alignment>B<, size_t >I<size>B<);>\n"
6343 "B<void *aligned_alloc(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
6344 "B<void *valloc(size_t >I<size>B<);>\n"
6345
6346 #. type: Plain text
6347 #: build/C/man3/posix_memalign.3:43
6348 #, no-wrap
6349 msgid ""
6350 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
6351 "B<void *pvalloc(size_t >I<size>B<);>\n"
6352 msgstr ""
6353 "B<void *memalign(size_t >I<alignment>B<, size_t >I<size>B<);>\n"
6354 "B<void *pvalloc(size_t >I<size>B<);>\n"
6355
6356 #. type: Plain text
6357 #: build/C/man3/posix_memalign.3:53
6358 msgid ""
6359 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
6360 "E<gt>=\\ 600"
6361 msgstr ""
6362 "B<posix_memalign>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
6363 "E<gt>=\\ 600"
6364
6365 #. type: Plain text
6366 #: build/C/man3/posix_memalign.3:56
6367 msgid "B<aligned_alloc>(): _ISOC11_SOURCE"
6368 msgstr "B<aligned_alloc>(): _ISOC11_SOURCE"
6369
6370 #. type: Plain text
6371 #: build/C/man3/posix_memalign.3:58
6372 msgid "B<valloc>():"
6373 msgstr "B<valloc>():"
6374
6375 #. type: TP
6376 #: build/C/man3/posix_memalign.3:61
6377 #, no-wrap
6378 msgid "Since glibc 2.12:"
6379 msgstr "glibc 2.12 以降:"
6380
6381 #. type: Plain text
6382 #: build/C/man3/posix_memalign.3:68
6383 #, no-wrap
6384 msgid ""
6385 "_BSD_SOURCE ||\n"
6386 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
6387 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
6388 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
6389 msgstr ""
6390 "_BSD_SOURCE ||\n"
6391 "    (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
6392 "        _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
6393 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
6394
6395 #. type: TP
6396 #: build/C/man3/posix_memalign.3:70
6397 #, no-wrap
6398 msgid "Before glibc 2.12:"
6399 msgstr "glibc 2.12 より前:"
6400
6401 #. type: Plain text
6402 #: build/C/man3/posix_memalign.3:74
6403 msgid ""
6404 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
6405 "_XOPEN_SOURCE_EXTENDED"
6406 msgstr ""
6407 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
6408 "_XOPEN_SOURCE_EXTENDED"
6409
6410 #. type: Plain text
6411 #: build/C/man3/posix_memalign.3:81
6412 msgid ""
6413 "(The (nonstandard) header file I<E<lt>malloc.hE<gt>> also exposes the "
6414 "declaration of B<valloc>(); no feature test macros are required.)"
6415 msgstr ""
6416 "((非標準の) ヘッダファイル I<E<lt>malloc.hE<gt>> も\n"
6417 "B<valloc>() の宣言も公開する。機能検査マクロは不要である。"
6418
6419 #.  glibc does this:
6420 #. type: Plain text
6421 #: build/C/man3/posix_memalign.3:102
6422 msgid ""
6423 "The function B<posix_memalign>()  allocates I<size> bytes and places the "
6424 "address of the allocated memory in I<*memptr>.  The address of the allocated "
6425 "memory will be a multiple of I<alignment>, which must be a power of two and "
6426 "a multiple of I<sizeof(void *)>.  If I<size> is 0, then B<posix_memalign>()  "
6427 "returns either NULL, or a unique pointer value that can later be "
6428 "successfully passed to B<free>(3)."
6429 msgstr ""
6430 "関数 B<posix_memalign>()  は、 I<size> バイトのメモリを割り当て、割り当てられ"
6431 "たメモリのアドレスを I<*memptr> に設定する。 割り当てられたメモリのアドレス"
6432 "は I<alignment> の倍数になっているはずである。 I<alignment> は 2 のべき乗で、"
6433 "かつ I<sizeof(void *)> の倍数でなければならない。 I<size> が 0 の場合、 "
6434 "B<posix_memalign>()  は NULL か一意なポインタ値を返す。 このポインタ値は、後"
6435 "で B<free>(3)  に問題なく渡すことができる。"
6436
6437 #.  The behavior of memalign() for size==0 is as for posix_memalign()
6438 #.  but no standards govern this.
6439 #. type: Plain text
6440 #: build/C/man3/posix_memalign.3:113
6441 msgid ""
6442 "The obsolete function B<memalign>()  allocates I<size> bytes and returns a "
6443 "pointer to the allocated memory.  The memory address will be a multiple of "
6444 "I<alignment>, which must be a power of two."
6445 msgstr ""
6446 "廃止された関数である B<memalign>() は、 I<size> バイトのメモリを割り当て、\n"
6447 "割り当てられたメモリへのポインタを返す。 メモリのアドレスは I<alignment> \n"
6448 "の倍数になっているはずである。 I<alignment> は 2 のべき乗でなければならない。"
6449
6450 #. type: Plain text
6451 #: build/C/man3/posix_memalign.3:122
6452 msgid ""
6453 "The function B<aligned_alloc>()  is the same as B<memalign>(), except for "
6454 "the added restriction that I<size> should be a multiple of I<alignment>."
6455 msgstr ""
6456 "関数 B<aligned_alloc>() は B<memalign>() と同じだが、I<size> が "
6457 "I<alignment>\n"
6458 "の倍数でなければならないという追加の制限がある点が異なる。"
6459
6460 #. type: Plain text
6461 #: build/C/man3/posix_memalign.3:132
6462 msgid ""
6463 "The obsolete function B<valloc>()  allocates I<size> bytes and returns a "
6464 "pointer to the allocated memory.  The memory address will be a multiple of "
6465 "the page size.  It is equivalent to I<memalign(sysconf(_SC_PAGESIZE),size)>."
6466 msgstr ""
6467 "廃止された関数である B<valloc>()  は I<size> バイトのメモリを割り当て、割り当"
6468 "てられたメモリへのポインタを返す。 メモリのアドレスはページサイズの倍数になっ"
6469 "ているはずである。 これは I<memalign(sysconf(_SC_PAGESIZE),size)> と等価であ"
6470 "る。"
6471
6472 #. type: Plain text
6473 #: build/C/man3/posix_memalign.3:139
6474 msgid ""
6475 "The obsolete function B<pvalloc>()  is similar to B<valloc>(), but rounds "
6476 "the size of the allocation up to the next multiple of the system page size."
6477 msgstr ""
6478 "廃止された関数 B<pvalloc>() は B<valloc>() と同様だが、\n"
6479 "割り当てられるサイズがシステムのページサイズの倍数に切り上げられる。"
6480
6481 #. type: Plain text
6482 #: build/C/man3/posix_memalign.3:141
6483 msgid "For all of these functions, the memory is not zeroed."
6484 msgstr "これらの関数はいずれもメモリのゼロクリアを行わない。"
6485
6486 #. type: Plain text
6487 #: build/C/man3/posix_memalign.3:148
6488 msgid ""
6489 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), and B<pvalloc>()  return a "
6490 "pointer to the allocated memory, or NULL if the request fails."
6491 msgstr ""
6492 "B<aligned_alloc>(), B<memalign>(), B<valloc>(), B<pvalloc>() は割り当てられ"
6493 "た\n"
6494 "メモリへのポインタを返す。 割り当てに失敗した場合は NULL を返す。"
6495
6496 #. type: Plain text
6497 #: build/C/man3/posix_memalign.3:155
6498 msgid ""
6499 "B<posix_memalign>()  returns zero on success, or one of the error values "
6500 "listed in the next section on failure.  Note that I<errno> is not set."
6501 msgstr ""
6502 "B<posix_memalign>()  は成功した場合は 0 を返し、 失敗した場合は次のセクション"
6503 "に記載されたエラー値のいずれかを返す。 I<errno> はセットされないことに注意す"
6504 "ること。"
6505
6506 #. type: Plain text
6507 #: build/C/man3/posix_memalign.3:162
6508 msgid ""
6509 "The I<alignment> argument was not a power of two, or was not a multiple of "
6510 "I<sizeof(void *)>."
6511 msgstr ""
6512 "I<alignment> 引き数が 2 のべき乗でなかったか、 I<sizeof(void *)> の倍数でな"
6513 "かった。"
6514
6515 #. type: Plain text
6516 #: build/C/man3/posix_memalign.3:165
6517 msgid "There was insufficient memory to fulfill the allocation request."
6518 msgstr "割り当て要求を満たすのに十分なメモリがなかった。"
6519
6520 #. type: Plain text
6521 #: build/C/man3/posix_memalign.3:172
6522 msgid ""
6523 "The functions B<memalign>(), B<valloc>(), and B<pvalloc>()  have been "
6524 "available in all Linux libc libraries."
6525 msgstr ""
6526 "関数 B<memalign>(), B<valloc>(), B<pvalloc>() は\n"
6527 "すべての Linux libc ライブラリで使用可能である。"
6528
6529 #. type: Plain text
6530 #: build/C/man3/posix_memalign.3:176
6531 msgid "The function B<aligned_alloc>()  was added to glibc in version 2.16."
6532 msgstr "関数 B<aligned_alloc>() は glibc バージョン 2.16 で追加された。"
6533
6534 #. type: Plain text
6535 #: build/C/man3/posix_memalign.3:180
6536 msgid "The function B<posix_memalign>()  is available since glibc 2.1.91."
6537 msgstr "関数 B<posix_fallocate>() は glibc 2.1.91 以降で利用可能である。"
6538
6539 #. type: Plain text
6540 #: build/C/man3/posix_memalign.3:187
6541 msgid ""
6542 "The function B<valloc>()  appeared in 3.0BSD.  It is documented as being "
6543 "obsolete in 4.3BSD, and as legacy in SUSv2.  It does not appear in "
6544 "POSIX.1-2001."
6545 msgstr ""
6546 "関数 B<valloc>() は 3.0BSD で登場した。4.3BSD では廃止されたと記載されてお"
6547 "り、\n"
6548 "SUSv2 では過去の名残だと記載されている。 POSIX.1-2001 には存在しない。"
6549
6550 #. type: Plain text
6551 #: build/C/man3/posix_memalign.3:191
6552 msgid "The function B<pvalloc>()  is a GNU extension."
6553 msgstr "関数 B<pvalloc>() は GNU による拡張である。"
6554
6555 #. type: Plain text
6556 #: build/C/man3/posix_memalign.3:195
6557 msgid "The function B<memalign>()  appears in SunOS 4.1.3 but not in 4.4BSD."
6558 msgstr "関数 B<memalign>() は SunOS 4.1.3 で登場したが、4.4BSD にはない。"
6559
6560 #. type: Plain text
6561 #: build/C/man3/posix_memalign.3:199
6562 msgid "The function B<posix_memalign>()  comes from POSIX.1d."
6563 msgstr "関数 B<posix_memalign>() は POSIX.1d に由来する。"
6564
6565 #. type: Plain text
6566 #: build/C/man3/posix_memalign.3:204
6567 msgid "The function B<aligned_alloc>()  is specified in the C11 standard."
6568 msgstr "関数 I<aligned_alloc>() は C11 標準で規定されている。"
6569
6570 #. type: SS
6571 #: build/C/man3/posix_memalign.3:204
6572 #, no-wrap
6573 msgid "Headers"
6574 msgstr "ヘッダ"
6575
6576 #. type: Plain text
6577 #: build/C/man3/posix_memalign.3:208
6578 msgid ""
6579 "Everybody agrees that B<posix_memalign>()  is declared in I<E<lt>stdlib."
6580 "hE<gt>>."
6581 msgstr ""
6582 "B<posix_memalign>()  の宣言を I<E<lt>stdlib.hE<gt>> で行うことに関しては、 皆"
6583 "の意見が一致している。"
6584
6585 #. type: Plain text
6586 #: build/C/man3/posix_memalign.3:212
6587 msgid ""
6588 "On some systems B<memalign>()  is declared in I<E<lt>stdlib.hE<gt>> instead "
6589 "of I<E<lt>malloc.hE<gt>>."
6590 msgstr ""
6591 "いくつかのシステムでは、 B<memalign>()  は I<E<lt>malloc.hE<gt>> ではなく "
6592 "I<E<lt>stdlib.hE<gt>> で宣言されている。"
6593
6594 #. type: Plain text
6595 #: build/C/man3/posix_memalign.3:219
6596 msgid ""
6597 "According to SUSv2, B<valloc>()  is declared in I<E<lt>stdlib.hE<gt>>.  "
6598 "Libc4,5 and glibc declare it in I<E<lt>malloc.hE<gt>>, and also in "
6599 "I<E<lt>stdlib.hE<gt>> if suitable feature test macros are defined (see "
6600 "above)."
6601 msgstr ""
6602 "SUSv2 によると、 B<valloc>() は I<E<lt>stdlib.hE<gt>> で宣言される。 "
6603 "libc4,5\n"
6604 "や glibc では I<E<lt>malloc.hE<gt>> で宣言されており、 さらに適切な機能検査\n"
6605 "マクロが定義された場合には I<E<lt>stdlib.hE<gt>> でも宣言される(上記を参照)。"
6606
6607 #. type: Plain text
6608 #: build/C/man3/posix_memalign.3:228
6609 msgid ""
6610 "On many systems there are alignment restrictions, for example, on buffers "
6611 "used for direct block device I/O.  POSIX specifies the I<pathconf(path,"
6612 "_PC_REC_XFER_ALIGN)> call that tells what alignment is needed.  Now one can "
6613 "use B<posix_memalign>()  to satisfy this requirement."
6614 msgstr ""
6615 "多くのシステムでは、アラインメントに関して制限がある。例えば、 ブロックデバイ"
6616 "スに対するダイレクト I/O に使用するバッファには アラインメントに関する制限が"
6617 "ある。 POSIX では、どんなアラインメントが必要かを知るために I<pathconf(path,"
6618 "_PC_REC_XFER_ALIGN)> コールを規定している。ここで B<posix_memalign>()  を使う"
6619 "と、この必要条件を満たすことができる。"
6620
6621 #. type: Plain text
6622 #: build/C/man3/posix_memalign.3:237
6623 msgid ""
6624 "B<posix_memalign>()  verifies that I<alignment> matches the requirements "
6625 "detailed above.  B<memalign>()  may not check that the I<alignment> argument "
6626 "is correct."
6627 msgstr ""
6628 "B<posix_memalign>() は I<alignment> が上で詳細に述べた必要条件を満たすか\n"
6629 "どうかを確かめる。 B<memalign>() は I<alignment> 引き数が正しいかどうかの\n"
6630 "確認を行わないかもしれない。"
6631
6632 #.  Other systems allow passing the result of
6633 #.  .IR valloc ()
6634 #.  to
6635 #.  .IR free (3),
6636 #.  but not to
6637 #.  .IR realloc (3).
6638 #. type: Plain text
6639 #: build/C/man3/posix_memalign.3:265
6640 msgid ""
6641 "POSIX requires that memory obtained from B<posix_memalign>()  can be freed "
6642 "using B<free>(3).  Some systems provide no way to reclaim memory allocated "
6643 "with B<memalign>()  or B<valloc>()  (because one can only pass to B<free>"
6644 "(3)  a pointer gotten from B<malloc>(3), while, for example, B<memalign>()  "
6645 "would call B<malloc>(3)  and then align the obtained value).  The glibc "
6646 "implementation allows memory obtained from any of these functions to be "
6647 "reclaimed with B<free>(3)."
6648 msgstr ""
6649 "POSIX では B<posix_memalign>() によって獲得したメモリは B<free>(3) を\n"
6650 "使って解放することができる必要がある。 いくつかのシステムでは\n"
6651 "B<memalign>() やB<valloc>() で割り当てられたメモリを再利用する手段が\n"
6652 "提供されていない(なぜなら B<free>(3) に渡すことができるのは\n"
6653 "B<malloc>(3) から受け取ったポインタだけだが、例えば B<memalign>() は\n"
6654 "B<malloc>(3) を呼び出し、得た値をアラインメントしてしまうからである)。\n"
6655 "glibc の実装では、 ここに述べた関数のいずれで獲得したメモリも\n"
6656 "B<free>(3) で再利用することができる。"
6657
6658 #. type: Plain text
6659 #: build/C/man3/posix_memalign.3:270
6660 msgid ""
6661 "The glibc B<malloc>(3)  always returns 8-byte aligned memory addresses, so "
6662 "these functions are only needed if you require larger alignment values."
6663 msgstr ""
6664 "glibc の B<malloc>(3) は常に 8 バイトにアラインメントされたメモリアドレスを\n"
6665 "返すので、ここで述べた関数が必要になるのは 8 バイトよりも大きなアラインメン"
6666 "ト\n"
6667 "が必要な場合だけである。"
6668
6669 #. type: Plain text
6670 #: build/C/man3/posix_memalign.3:275
6671 msgid "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6672 msgstr "B<brk>(2), B<getpagesize>(2), B<free>(3), B<malloc>(3)"
6673
6674 #. type: TH
6675 #: build/C/man2/readahead.2:28
6676 #, no-wrap
6677 msgid "READAHEAD"
6678 msgstr "READAHEAD"
6679
6680 #. type: TH
6681 #: build/C/man2/readahead.2:28 build/C/man7/shm_overview.7:27
6682 #, no-wrap
6683 msgid "2010-09-10"
6684 msgstr "2010-09-10"
6685
6686 #. type: Plain text
6687 #: build/C/man2/readahead.2:31
6688 msgid "readahead - perform file readahead into page cache"
6689 msgstr "readahead - 前もってファイルをページ・キャッシュに読み込む"
6690
6691 #. type: Plain text
6692 #: build/C/man2/readahead.2:37
6693 #, no-wrap
6694 msgid "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6695 msgstr "B<ssize_t readahead(int >I<fd>B<, off64_t >I<offset>B<, size_t >I<count>B<);>\n"
6696
6697 #. type: Plain text
6698 #: build/C/man2/readahead.2:65
6699 msgid ""
6700 "B<readahead>()  populates the page cache with data from a file so that "
6701 "subsequent reads from that file will not block on disk I/O.  The I<fd> "
6702 "argument is a file descriptor identifying the file which is to be read.  The "
6703 "I<offset> argument specifies the starting point from which data is to be "
6704 "read and I<count> specifies the number of bytes to be read.  I/O is "
6705 "performed in whole pages, so that I<offset> is effectively rounded down to a "
6706 "page boundary and bytes are read up to the next page boundary greater than "
6707 "or equal to I<(offset+count)>.  B<readahead>()  does not read beyond the end "
6708 "of the file.  B<readahead>()  blocks until the specified data has been "
6709 "read.  The current file offset of the open file referred to by I<fd> is left "
6710 "unchanged."
6711 msgstr ""
6712 "B<readahead>()  は、この後の同じファイルからのデータ読み込み時にディスク I/O "
6713 "で 動作が停止 (block) しないように、前もってファイルの内容を ページ・キャッ"
6714 "シュに読み込む。 I<fd> 引き数は読み込みを行うファイルを識別するファイル・ディ"
6715 "スクリプタである。 I<offset> 引き数はデータの読み込み開始位置を指定し、 "
6716 "I<count> は読み込むデータのバイト数を指定する。 ディスク I/O はページ単位で実"
6717 "行されるので、 実際には I<offset> はページ境界に切り下げられ、読み込みバイト"
6718 "数は I<(offset+count)> より小さくない次のページ境界まで切り上げられる。 "
6719 "B<readahead>()  はファイルの末尾を越えた範囲まで読み出しを行うことはない。ま"
6720 "た、 B<readahead>()  は指定したデータの読み込みが終わるまで停止 (block) す"
6721 "る。 I<fd> で参照されたオープン済のファイルのファイルオフセットの現在値は 変"
6722 "更されない。"
6723
6724 #. type: Plain text
6725 #: build/C/man2/readahead.2:71
6726 msgid ""
6727 "On success, B<readahead>()  returns 0; on failure, -1 is returned, with "
6728 "I<errno> set to indicate the cause of the error."
6729 msgstr ""
6730 "B<readahead>()  は成功すると 0 を返す。失敗した場合 -1 を返し、 I<errno> にエ"
6731 "ラーの原因を示す値を設定する。"
6732
6733 #. type: Plain text
6734 #: build/C/man2/readahead.2:76
6735 msgid "I<fd> is not a valid file descriptor or is not open for reading."
6736 msgstr ""
6737 "I<fd> が有効なファイル・ディスクリプタでない、または 読み込み用にオープンされ"
6738 "ていない。"
6739
6740 #. type: Plain text
6741 #: build/C/man2/readahead.2:82
6742 msgid ""
6743 "I<fd> does not refer to a file type to which B<readahead>()  can be applied."
6744 msgstr ""
6745 "I<fd> が参照しているファイルが、 B<readahead>()  を行うことができないタイプの"
6746 "ファイルであった。"
6747
6748 #. type: Plain text
6749 #: build/C/man2/readahead.2:87
6750 msgid ""
6751 "The B<readahead>()  system call appeared in Linux 2.4.13; glibc support has "
6752 "been provided since version 2.3."
6753 msgstr ""
6754 "B<readahead>()  システムコールは Linux 2.4.13 で登場した。 glibc でのサポート"
6755 "は glibc バージョン 2.3 以降で行われている。"
6756
6757 #. type: Plain text
6758 #: build/C/man2/readahead.2:92
6759 msgid ""
6760 "The B<readahead>()  system call is Linux-specific, and its use should be "
6761 "avoided in portable applications."
6762 msgstr ""
6763 "B<readahead>()  システムコールは Linux 固有であり、移植を考慮したプログラムで"
6764 "は 使用を避けるべきである。"
6765
6766 #. type: Plain text
6767 #: build/C/man2/readahead.2:98
6768 msgid "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6769 msgstr ""
6770 "B<lseek>(2), B<madvise>(2), B<mmap>(2), B<posix_fadvise>(2), B<read>(2)"
6771
6772 #. type: TH
6773 #: build/C/man2/remap_file_pages.2:26
6774 #, no-wrap
6775 msgid "REMAP_FILE_PAGES"
6776 msgstr "REMAP_FILE_PAGES"
6777
6778 #. type: Plain text
6779 #: build/C/man2/remap_file_pages.2:29
6780 msgid "remap_file_pages - create a nonlinear file mapping"
6781 msgstr "remap_file_pages - 非線形ファイルマッピングを作成する。"
6782
6783 #. type: Plain text
6784 #: build/C/man2/remap_file_pages.2:33
6785 #, no-wrap
6786 msgid ""
6787 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6788 "B<#include E<lt>sys/mman.hE<gt>>\n"
6789 msgstr ""
6790 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6791 "B<#include E<lt>sys/mman.hE<gt>>\n"
6792
6793 #. type: Plain text
6794 #: build/C/man2/remap_file_pages.2:36
6795 #, no-wrap
6796 msgid ""
6797 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6798 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6799 msgstr ""
6800 "B<int remap_file_pages(void *>I<addr>B<, size_t >I<size>B<, int >I<prot>B<,>\n"
6801 "B<                     ssize_t >I<pgoff>B<, int >I<flags>B<);>\n"
6802
6803 #. type: Plain text
6804 #: build/C/man2/remap_file_pages.2:49
6805 msgid ""
6806 "The B<remap_file_pages>()  system call is used to create a nonlinear "
6807 "mapping, that is, a mapping in which the pages of the file are mapped into a "
6808 "nonsequential order in memory.  The advantage of using B<remap_file_pages>"
6809 "()  over using repeated calls to B<mmap>(2)  is that the former approach "
6810 "does not require the kernel to create additional VMA (Virtual Memory Area) "
6811 "data structures."
6812 msgstr ""
6813 "B<remap_file_pages>()  システムコールは非線形なマッピング、 つまりファイルの"
6814 "ページがメモリ上で連続しない順番でマップされる マッピングを作成するために使わ"
6815 "れる。 B<remap_file_pages>()  を使う方が B<mmap>(2)  を繰り返して使うより優れ"
6816 "ている点は、 前者の方法ではカーネルが VMA (Virtual Memory Area, 仮想メモリ領"
6817 "域)  データ構造体を追加で作成する必要がないことである。"
6818
6819 #. type: Plain text
6820 #: build/C/man2/remap_file_pages.2:51
6821 msgid "To create a nonlinear mapping we perform the following steps:"
6822 msgstr "非線形マッピングを作成するためには、 以下のようなステップを実行する:"
6823
6824 #. type: TP
6825 #: build/C/man2/remap_file_pages.2:51
6826 #, no-wrap
6827 msgid "1."
6828 msgstr "1."
6829
6830 #. type: Plain text
6831 #: build/C/man2/remap_file_pages.2:59
6832 msgid ""
6833 "Use B<mmap>(2)  to create a mapping (which is initially linear).  This "
6834 "mapping must be created with the B<MAP_SHARED> flag."
6835 msgstr ""
6836 "B<mmap>(2)  を使い、マッピングを作成する (このマッピングは最初は線形であ"
6837 "る)。 このマッピングは B<MAP_SHARED> フラグを指定して作成されなければならな"
6838 "い。"
6839
6840 #. type: TP
6841 #: build/C/man2/remap_file_pages.2:59
6842 #, no-wrap
6843 msgid "2."
6844 msgstr "2."
6845
6846 #. type: Plain text
6847 #: build/C/man2/remap_file_pages.2:67
6848 msgid ""
6849 "Use one or more calls to B<remap_file_pages>()  to rearrange the "
6850 "correspondence between the pages of the mapping and the pages of the file.  "
6851 "It is possible to map the same page of a file into multiple locations within "
6852 "the mapped region."
6853 msgstr ""
6854 "B<remap_file_pages>()  を 1 回以上呼び出して、 マッピングのページとファイルの"
6855 "ページの対応関係を再構成する。 ファイルの同じページをマッピング領域の複数の場"
6856 "所に マップすることが可能である。"
6857
6858 #. type: Plain text
6859 #: build/C/man2/remap_file_pages.2:78
6860 msgid ""
6861 "The I<pgoff> and I<size> arguments specify the region of the file that is to "
6862 "be relocated within the mapping: I<pgoff> is a file offset in units of the "
6863 "system page size; I<size> is the length of the region in bytes."
6864 msgstr ""
6865 "I<pgoff> と I<size> 引き数は、マッピング内で再配置されるファイルの領域を指定"
6866 "する。 I<pgoff> はファイルオフセットであり、単位はシステムのページサイズであ"
6867 "る。 I<size> は領域の長さであり、単位はバイトである。"
6868
6869 #. type: Plain text
6870 #: build/C/man2/remap_file_pages.2:96
6871 msgid ""
6872 "The I<addr> argument serves two purposes.  First, it identifies the mapping "
6873 "whose pages we want to rearrange.  Thus, I<addr> must be an address that "
6874 "falls within a region previously mapped by a call to B<mmap>(2).  Second, "
6875 "I<addr> specifies the address at which the file pages identified by I<pgoff> "
6876 "and I<size> will be placed."
6877 msgstr ""
6878 "I<addr> 引き数は 2 つの目的で使われる。 第 1 の目的は、この引き数によって再編"
6879 "成したいページの マッピングを識別することである。 よって I<addr> は B<mmap>"
6880 "(2)  の呼び出しで過去にマップされた領域内のアドレスでなければならない。 第 2 "
6881 "の目的は、 I<pgoff> と I<size> で識別されるファイルページが置かれる予定のアド"
6882 "レスを、 I<addr> によって指定することである。"
6883
6884 #.  This rounding is weird, and not consistent with the treatment of
6885 #.  the analogous arguments for munmap()/mprotect() and for mlock().
6886 #.  MTK, 14 Sep 2005
6887 #. type: Plain text
6888 #: build/C/man2/remap_file_pages.2:110
6889 msgid ""
6890 "The values specified in I<addr> and I<size> should be multiples of the "
6891 "system page size.  If they are not, then the kernel rounds I<both> values "
6892 "I<down> to the nearest multiple of the page size."
6893 msgstr ""
6894 "I<addr> と I<size> に指定する値は、システムのページサイズの倍数とすべきであ"
6895 "る。 それ以外の場合、カーネルは「両方」の値を 最も近いページサイズの倍数へ"
6896 "「切り下げる」。"
6897
6898 #. type: Plain text
6899 #: build/C/man2/remap_file_pages.2:114
6900 msgid "The I<prot> argument must be specified as 0."
6901 msgstr "I<prot> 引き数は 0 に指定されなければならない。"
6902
6903 #. type: Plain text
6904 #: build/C/man2/remap_file_pages.2:122
6905 msgid ""
6906 "The I<flags> argument has the same meaning as for B<mmap>(2), but all flags "
6907 "other than B<MAP_NONBLOCK> are ignored."
6908 msgstr ""
6909 "I<flags> 引き数は B<mmap>(2)  のものと同じ意味であるが、 B<MAP_NONBLOCK> 以外"
6910 "の全てのフラグは無視される。"
6911
6912 #. type: Plain text
6913 #: build/C/man2/remap_file_pages.2:129
6914 msgid ""
6915 "On success, B<remap_file_pages>()  returns 0.  On error, -1 is returned, and "
6916 "I<errno> is set appropriately."
6917 msgstr ""
6918 "成功した場合、 B<remap_file_pages>()  は 0 を返す。 エラーの場合、-1 が返さ"
6919 "れ、 I<errno> が適切に設定される。"
6920
6921 #. type: Plain text
6922 #: build/C/man2/remap_file_pages.2:137
6923 msgid ""
6924 "I<addr> does not refer to a valid mapping created with the B<MAP_SHARED> "
6925 "flag."
6926 msgstr ""
6927 "I<addr> が B<MAP_SHARED> フラグを指定して作成された有効なマッピングを参照して"
6928 "いない。"
6929
6930 #.  And possibly others from vma->vm_ops->populate()
6931 #. type: Plain text
6932 #: build/C/man2/remap_file_pages.2:146
6933 msgid "I<addr>, I<size>, I<prot>, or I<pgoff> is invalid."
6934 msgstr "I<addr>, I<size>, I<prot>, I<pgoff> のいずれかが不正である。"
6935
6936 #. type: Plain text
6937 #: build/C/man2/remap_file_pages.2:151
6938 msgid ""
6939 "The B<remap_file_pages>()  system call appeared in Linux 2.5.46; glibc "
6940 "support was added in version 2.3.3."
6941 msgstr ""
6942 "B<remap_file_pages>()  システムコールは Linux 2.5.46 で登場した。 glibc での"
6943 "サポートは glibc バージョン 2.3.3 で追加された。"
6944
6945 #. type: Plain text
6946 #: build/C/man2/remap_file_pages.2:155
6947 msgid "The B<remap_file_pages>()  system call is Linux-specific."
6948 msgstr "B<remap_file_pages>()  システムコールは Linux 固有のものである。"
6949
6950 #. type: Plain text
6951 #: build/C/man2/remap_file_pages.2:162
6952 msgid ""
6953 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6954 "B<msync>(2)"
6955 msgstr ""
6956 "B<getpagesize>(2), B<mmap>(2), B<mmap2>(2), B<mprotect>(2), B<mremap>(2), "
6957 "B<msync>(2)"
6958
6959 #. type: TH
6960 #: build/C/man3/shm_open.3:26
6961 #, no-wrap
6962 msgid "SHM_OPEN"
6963 msgstr "SHM_OPEN"
6964
6965 #. type: TH
6966 #: build/C/man3/shm_open.3:26
6967 #, no-wrap
6968 msgid "2009-02-25"
6969 msgstr "2009-02-25"
6970
6971 #. type: Plain text
6972 #: build/C/man3/shm_open.3:29
6973 msgid ""
6974 "shm_open, shm_unlink - Create/open or unlink POSIX shared memory objects"
6975 msgstr ""
6976 "shm_open, shm_unlink - POSIX 共有メモリ・オブジェクトの作成/オープン、 削除を"
6977 "行う"
6978
6979 #. type: Plain text
6980 #: build/C/man3/shm_open.3:33
6981 msgid "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */"
6982 msgstr "B<#include E<lt>sys/stat.hE<gt>> /* mode 定数用 */"
6983
6984 #. type: Plain text
6985 #: build/C/man3/shm_open.3:35
6986 msgid "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */"
6987 msgstr "B<#include E<lt>fcntl.hE<gt>> /* O_* 定数の定義用 */"
6988
6989 #. type: Plain text
6990 #: build/C/man3/shm_open.3:37
6991 msgid ""
6992 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
6993 msgstr ""
6994 "B<void * shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t "
6995 ">I<mode>B<);>"
6996
6997 #. type: Plain text
6998 #: build/C/man3/shm_open.3:39
6999 msgid "B<int shm_unlink(const char *>I<name>B<);>"
7000 msgstr "B<int shm_unlink(const char *>I<name>B<);>"
7001
7002 #. type: Plain text
7003 #: build/C/man3/shm_open.3:41
7004 msgid "Link with I<-lrt>."
7005 msgstr "I<-lrt> でリンクする。"
7006
7007 #. type: Plain text
7008 #: build/C/man3/shm_open.3:53
7009 msgid ""
7010 "B<shm_open>()  creates and opens a new, or opens an existing, POSIX shared "
7011 "memory object.  A POSIX shared memory object is in effect a handle which can "
7012 "be used by unrelated processes to B<mmap>(2)  the same region of shared "
7013 "memory.  The B<shm_unlink>()  function performs the converse operation, "
7014 "removing an object previously created by B<shm_open>()."
7015 msgstr ""
7016 "B<shm_open>()  は、POSIX 共有メモリ・オブジェクトを新規に作成/オープンした"
7017 "り、 すでに存在するオブジェクトをオープンしたりする。 POSIX 共有メモリ・オブ"
7018 "ジェクトは、実際には、関係のないプロセスが 共有メモリの同じ領域を B<mmap>"
7019 "(2)  するために使用することができる手段である。 B<shm_unlink>()  は、逆の操"
7020 "作、つまり以前に B<shm_open>()  で作成されたオブジェクトの削除を行う。"
7021
7022 #.  glibc allows the initial slash to be omitted, and makes
7023 #.  multiple initial slashes equivalent to a single slash.
7024 #.  This differs from the implementation of POSIX message queues.
7025 #.  glibc allows subdirectory components in the name, in which
7026 #.  case the subdirectory must exist under /dev/shm, and allow the
7027 #.  required permissions if a user wants to create a shared memory
7028 #.  object in that subdirectory.
7029 #. type: Plain text
7030 #: build/C/man3/shm_open.3:74
7031 msgid ""
7032 "The operation of B<shm_open>()  is analogous to that of B<open>(2).  I<name> "
7033 "specifies the shared memory object to be created or opened.  For portable "
7034 "use, a shared memory object should be identified by a name of the form I</"
7035 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
7036 "255) characters consisting of an initial slash, followed by one or more "
7037 "characters, none of which are slashes."
7038 msgstr ""
7039 "B<shm_open>()  の動作は B<open>(2)  とよく似ている。 I<name> で作成したりオー"
7040 "プンしたりする共有メモリ・オブジェクトを指定する。 移植性を持たせるためには、"
7041 "共有メモリ・オブジェクトは I</somename> という形式の名前で識別し、 その名前"
7042 "は、最大で B<NAME_MAX> (すなわち 255) 文字の NULL 終端された文字列で、 スラッ"
7043 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式 にすべきである。"
7044
7045 #. type: Plain text
7046 #: build/C/man3/shm_open.3:81
7047 msgid ""
7048 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
7049 "or B<O_RDWR> and any of the other flags listed here:"
7050 msgstr ""
7051 "I<oflag> はビットマスクで、 B<O_RDONLY> と B<O_RDWR> のいずれか一方と、以下に"
7052 "述べる他のフラグの論理和をとったもの を指定する。"
7053
7054 #. type: TP
7055 #: build/C/man3/shm_open.3:81
7056 #, no-wrap
7057 msgid "B<O_RDONLY>"
7058 msgstr "B<O_RDONLY>"
7059
7060 #. type: Plain text
7061 #: build/C/man3/shm_open.3:87
7062 msgid ""
7063 "Open the object for read access.  A shared memory object opened in this way "
7064 "can only be B<mmap>(2)ed for read (B<PROT_READ>) access."
7065 msgstr ""
7066 "読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープン"
7067 "された共有メモリ・オブジェクトは、 読み出し (B<PROT_READ>) アクセスでのみ "
7068 "B<mmap>(2)  することができる。"
7069
7070 #. type: TP
7071 #: build/C/man3/shm_open.3:87
7072 #, no-wrap
7073 msgid "B<O_RDWR>"
7074 msgstr "B<O_RDWR>"
7075
7076 #. type: Plain text
7077 #: build/C/man3/shm_open.3:90
7078 msgid "Open the object for read-write access."
7079 msgstr "読み書きアクセス用にオブジェクトをオープンする。"
7080
7081 #. type: TP
7082 #: build/C/man3/shm_open.3:90
7083 #, no-wrap
7084 msgid "B<O_CREAT>"
7085 msgstr "B<O_CREAT>"
7086
7087 #.  In truth it is actually the file system IDs on Linux, but these
7088 #.  are nearly always the same as the effective IDs.  (MTK, Jul 05)
7089 #. type: Plain text
7090 #: build/C/man3/shm_open.3:110
7091 msgid ""
7092 "Create the shared memory object if it does not exist.  The user and group "
7093 "ownership of the object are taken from the corresponding effective IDs of "
7094 "the calling process, and the object's permission bits are set according to "
7095 "the low-order 9 bits of I<mode>, except that those bits set in the process "
7096 "file mode creation mask (see B<umask>(2))  are cleared for the new object.  "
7097 "A set of macro constants which can be used to define I<mode> is listed in "
7098 "B<open>(2).  (Symbolic definitions of these constants can be obtained by "
7099 "including I<E<lt>sys/stat.hE<gt>>.)"
7100 msgstr ""
7101 "存在しない場合、共有メモリ・オブジェクトを作成する。 オブジェクトのユーザとグ"
7102 "ループの所有権は、 呼び出し元プロセスの対応する実効 ID が使われ、 オブジェク"
7103 "トの許可ビットは I<mode> の下位 9 ビットに基づいて設定される。ただし、 ファイ"
7104 "ルモード作成マスク (B<umask>(2)  参照) に設定されている値は、新規オブジェクト"
7105 "に関してはクリアされる。 I<mode> を定義するために使用できるマクロ定数(群)は "
7106 "B<open>(2)  に記載されている (これらの定数のシンボル定義は I<E<lt>sys/stat."
7107 "hE<gt>> のインクルードにより得られる)。"
7108
7109 #. type: Plain text
7110 #: build/C/man3/shm_open.3:116
7111 msgid ""
7112 "A new shared memory object initially has zero length\\(emthe size of the "
7113 "object can be set using B<ftruncate>(2).  The newly allocated bytes of a "
7114 "shared memory object are automatically initialized to 0."
7115 msgstr ""
7116 "新規に作成された共有メモリ・オブジェクトは長さ 0 で初期化される。 オブジェク"
7117 "トの大きさは B<ftruncate>(2)  を使って設定できる。 共有メモリ・オブジェクトと"
7118 "して新規に確保されたバイトは自動的に 0 に初期化される。"
7119
7120 #. type: TP
7121 #: build/C/man3/shm_open.3:116
7122 #, no-wrap
7123 msgid "B<O_EXCL>"
7124 msgstr "B<O_EXCL>"
7125
7126 #. type: Plain text
7127 #: build/C/man3/shm_open.3:125
7128 msgid ""
7129 "If B<O_CREAT> was also specified, and a shared memory object with the given "
7130 "I<name> already exists, return an error.  The check for the existence of the "
7131 "object, and its creation if it does not exist, are performed atomically."
7132 msgstr ""
7133 "B<O_CREAT> が一緒に指定されており、 I<name> で指定された共有メモリ・オブジェ"
7134 "クトが既に存在した場合、 エラーを返す。 オブジェクトの存在確認と、存在しな"
7135 "かった場合のオブジェクト作成は、 必ず一連の操作として実行される (performed "
7136 "atomically)。"
7137
7138 #. type: TP
7139 #: build/C/man3/shm_open.3:125
7140 #, no-wrap
7141 msgid "B<O_TRUNC>"
7142 msgstr "B<O_TRUNC>"
7143
7144 #. type: Plain text
7145 #: build/C/man3/shm_open.3:128
7146 msgid "If the shared memory object already exists, truncate it to zero bytes."
7147 msgstr ""
7148 "共有メモリ・オブジェクトがすでに存在した場合、 そのオブジェクトを 0 バイトに"
7149 "切り詰める。"
7150
7151 #. type: Plain text
7152 #: build/C/man3/shm_open.3:131
7153 msgid ""
7154 "Definitions of these flag values can be obtained by including I<E<lt>fcntl."
7155 "hE<gt>>."
7156 msgstr ""
7157 "これらのフラグ値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる。"
7158
7159 #. type: Plain text
7160 #: build/C/man3/shm_open.3:142
7161 msgid ""
7162 "On successful completion B<shm_open>()  returns a new file descriptor "
7163 "referring to the shared memory object.  This file descriptor is guaranteed "
7164 "to be the lowest-numbered file descriptor not previously opened within the "
7165 "process.  The B<FD_CLOEXEC> flag (see B<fcntl>(2))  is set for the file "
7166 "descriptor."
7167 msgstr ""
7168 "成功して完了した場合、 B<shm_open>()  は共有メモリ・オブジェクトを参照する新"
7169 "しいファイル・ディスクリプタを返す。 このファイル・ディスクリプタは、そのプロ"
7170 "セス内で過去にオープンされていない ファイル・ディスクリプタの中で最も小さな数"
7171 "になることが保証される。 B<FD_CLOEXEC> フラグ (B<fcntl>(2)  を参照) が、この"
7172 "ファイル・ディスクリプタに設定される。"
7173
7174 #. type: Plain text
7175 #: build/C/man3/shm_open.3:151
7176 msgid ""
7177 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2)  "
7178 "(for a newly created object) and B<mmap>(2).  After a call to B<mmap>(2)  "
7179 "the file descriptor may be closed without affecting the memory mapping."
7180 msgstr ""
7181 "通常、これらのファイル・ディスクリプタは、この後続けて実行される B<ftruncate>"
7182 "(2)  (新規に作成されたオブジェクトの場合のみ) と B<mmap>(2)  の呼び出しに使用"
7183 "される。 B<mmap>(2)  を呼び出した後は、ファイル・ディスクリプタをクローズして"
7184 "もよく、 クローズしてもメモリ・マッピングに影響を与えることはない。"
7185
7186 #. type: Plain text
7187 #: build/C/man3/shm_open.3:169
7188 msgid ""
7189 "The operation of B<shm_unlink>()  is analogous to B<unlink>(2): it removes a "
7190 "shared memory object name, and, once all processes have unmapped the object, "
7191 "de-allocates and destroys the contents of the associated memory region.  "
7192 "After a successful B<shm_unlink>(), attempts to B<shm_open>()  an object "
7193 "with the same I<name> will fail (unless B<O_CREAT> was specified, in which "
7194 "case a new, distinct object is created)."
7195 msgstr ""
7196 "B<shm_unlink>()  の動作は B<unlink>(2)  とよく似ている: 共有メモリ・オブジェ"
7197 "クト名を削除し、すべてのプロセスが処理対象の オブジェクトをアンマップした時点"
7198 "でオブジェクトの割り当てを解除し、 対応するメモリ領域の内容を破棄する。 "
7199 "B<shm_unlink>()  が成功した後で、同じ I<name> を持つオブジェクトに対して "
7200 "B<shm_open>()  を行うと、 (B<O_CREAT> が指定されていない場合) 失敗する。 "
7201 "(B<O_CREAT> が指定されている場合、新しく別のオブジェクトが作成される)。"
7202
7203 #. type: Plain text
7204 #: build/C/man3/shm_open.3:178
7205 msgid ""
7206 "On success, B<shm_open>()  returns a nonnegative file descriptor.  On "
7207 "failure, B<shm_open>()  returns -1.  B<shm_unlink>()  returns 0 on success, "
7208 "or -1 on error."
7209 msgstr ""
7210 "成功した場合、 B<shm_open>()  は非負のファイル・ディスクリプタを返す。 失敗し"
7211 "た場合、 B<shm_open>()  は -1 を返す。 B<shm_unlink>()  は、成功した場合 0 "
7212 "を、エラーが起こった場合 -1 を返す。"
7213
7214 #. type: Plain text
7215 #: build/C/man3/shm_open.3:185
7216 msgid ""
7217 "On failure, I<errno> is set to indicate the cause of the error.  Values "
7218 "which may appear in I<errno> include the following:"
7219 msgstr ""
7220 "失敗した場合、エラーの原因を示すため I<errno> が設定される。 I<errno> に設定"
7221 "される値は以下の通りである:"
7222
7223 #. type: Plain text
7224 #: build/C/man3/shm_open.3:190
7225 msgid "Permission to B<shm_unlink>()  the shared memory object was denied."
7226 msgstr "共有メモリオブジェクトを B<shm_unlink>()  する権限がなかった。"
7227
7228 #. type: Plain text
7229 #: build/C/man3/shm_open.3:200
7230 msgid ""
7231 "Permission was denied to B<shm_open>()  I<name> in the specified I<mode>, or "
7232 "B<O_TRUNC> was specified and the caller does not have write permission on "
7233 "the object."
7234 msgstr ""
7235 "指定された I<mode> で I<name> を B<shm_open>()  する権限がなかった。もしく"
7236 "は、 B<O_TRUNC> が指定されたが、呼び出し元にはそのオブジェクトに対する書き込"
7237 "み権限が なかった。"
7238
7239 #. type: TP
7240 #: build/C/man3/shm_open.3:200 build/C/man2/shmget.2:192
7241 #, no-wrap
7242 msgid "B<EEXIST>"
7243 msgstr "B<EEXIST>"
7244
7245 #. type: Plain text
7246 #: build/C/man3/shm_open.3:211
7247 msgid ""
7248 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>()  and the "
7249 "shared memory object specified by I<name> already exists."
7250 msgstr ""
7251 "B<O_CREAT> と B<O_EXCL> の両方が B<shm_open>()  に指定されたが、 I<name> で指"
7252 "定された共有メモリ・オブジェクトが既に存在した。"
7253
7254 #. type: Plain text
7255 #: build/C/man3/shm_open.3:218
7256 msgid "The I<name> argument to B<shm_open>()  was invalid."
7257 msgstr "B<shm_open>()  に与えられた I<name> 引き数が不正であった。"
7258
7259 #. type: TP
7260 #: build/C/man3/shm_open.3:218
7261 #, no-wrap
7262 msgid "B<EMFILE>"
7263 msgstr "B<EMFILE>"
7264
7265 #. type: Plain text
7266 #: build/C/man3/shm_open.3:221
7267 msgid "The process already has the maximum number of files open."
7268 msgstr "プロセスがオープン可能なファイル数の上限にすでに達していた。"
7269
7270 #. type: TP
7271 #: build/C/man3/shm_open.3:221
7272 #, no-wrap
7273 msgid "B<ENAMETOOLONG>"
7274 msgstr "B<ENAMETOOLONG>"
7275
7276 #. type: Plain text
7277 #: build/C/man3/shm_open.3:227
7278 msgid "The length of I<name> exceeds B<PATH_MAX>."
7279 msgstr "I<name> の長さが B<PATH_MAX> を越えている。"
7280
7281 #. type: Plain text
7282 #: build/C/man3/shm_open.3:231
7283 msgid ""
7284 "The limit on the total number of files open on the system has been reached."
7285 msgstr "ファイルシステムでオープンできるファイル数の上限に達した。"
7286
7287 #. type: TP
7288 #: build/C/man3/shm_open.3:231 build/C/man3/shm_open.3:240
7289 #: build/C/man2/shmget.2:206
7290 #, no-wrap
7291 msgid "B<ENOENT>"
7292 msgstr "B<ENOENT>"
7293
7294 #. type: Plain text
7295 #: build/C/man3/shm_open.3:240
7296 msgid ""
7297 "An attempt was made to B<shm_open>()  a I<name> that did not exist, and "
7298 "B<O_CREAT> was not specified."
7299 msgstr ""
7300 "存在していない I<name> のオブジェクトを B<shm_open>()  しようとしたが、 "
7301 "B<O_CREAT> が指定されていなかった。"
7302
7303 #. type: Plain text
7304 #: build/C/man3/shm_open.3:247
7305 msgid ""
7306 "An attempt was to made to B<shm_unlink>()  a I<name> that does not exist."
7307 msgstr "存在しない I<name> のオブジェクトを B<shm_unlink>()  しようとした。"
7308
7309 #. type: Plain text
7310 #: build/C/man3/shm_open.3:249
7311 msgid "These functions are provided in glibc 2.2 and later."
7312 msgstr "これらの関数は glibc 2.2 以降で提供されている。"
7313
7314 #. type: Plain text
7315 #: build/C/man3/shm_open.3:255
7316 msgid ""
7317 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
7318 "object is set to either the calling process's effective group ID or \"a "
7319 "system default group ID\"."
7320 msgstr ""
7321 "POSIX.1-2001 には、新規に作成される共有メモリオブジェクトのグループ所有権"
7322 "は、 呼び出し元プロセスの実効グループ ID か 「システムのデフォルトのグループ "
7323 "ID」 のどちらかに設定される、と書かれている。"
7324
7325 #. type: Plain text
7326 #: build/C/man3/shm_open.3:264
7327 msgid ""
7328 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
7329 "unspecified.  On Linux, this will successfully truncate an existing shared "
7330 "memory object\\(emthis may not be so on other UNIX systems."
7331 msgstr ""
7332 "POSIX は B<O_RDONLY> と B<O_TRUNC> が一緒に指定された場合の動作を未定義にして"
7333 "いる。Linux では、 既存の共有メモリ・オブジェクトに対する切り詰め (truncate) "
7334 "は成功する。 しかし、他の UNIX システムでも同じであるとは限らない。"
7335
7336 #. type: Plain text
7337 #: build/C/man3/shm_open.3:269
7338 msgid ""
7339 "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
7340 "dedicated file system, which is normally mounted under I</dev/shm>."
7341 msgstr ""
7342 "Linux 2.4 における POSIX 共有メモリ・オブジェクトの実装は 専用のファイルシス"
7343 "テムを使用する。そのファイルシステムは通常 I</dev/shm> にマウントされる。"
7344
7345 #. type: Plain text
7346 #: build/C/man3/shm_open.3:280
7347 msgid ""
7348 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
7349 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
7350 msgstr ""
7351 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
7352 "B<ftruncate>(2), B<mmap>(2), B<open>(2), B<umask>(2), B<shm_overview>(7)"
7353
7354 #. type: TH
7355 #: build/C/man7/shm_overview.7:27
7356 #, no-wrap
7357 msgid "SHM_OVERVIEW"
7358 msgstr "SHM_OVERVIEW"
7359
7360 #. type: Plain text
7361 #: build/C/man7/shm_overview.7:30
7362 msgid "shm_overview - Overview of POSIX shared memory"
7363 msgstr "shm_overview - POSIX 共有メモリの概要"
7364
7365 #. type: Plain text
7366 #: build/C/man7/shm_overview.7:33
7367 msgid ""
7368 "The POSIX shared memory API allows processes to communicate information by "
7369 "sharing a region of memory."
7370 msgstr ""
7371 "POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で"
7372 "情報をやり取りすることができる。"
7373
7374 #. type: Plain text
7375 #: build/C/man7/shm_overview.7:35
7376 msgid "The interfaces employed in the API are:"
7377 msgstr "この API では以下のインターフェースが採用されている。"
7378
7379 #. type: TP
7380 #: build/C/man7/shm_overview.7:35
7381 #, no-wrap
7382 msgid "B<shm_open>(3)"
7383 msgstr "B<shm_open>(3)"
7384
7385 #. type: Plain text
7386 #: build/C/man7/shm_overview.7:42
7387 msgid ""
7388 "Create and open a new object, or open an existing object.  This is analogous "
7389 "to B<open>(2).  The call returns a file descriptor for use by the other "
7390 "interfaces listed below."
7391 msgstr ""
7392 "新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープン"
7393 "する。これは B<open>(2)  と同じである。下記にある他のインターフェースで使用す"
7394 "る ファイルディスクリプタを返す。"
7395
7396 #. type: TP
7397 #: build/C/man7/shm_overview.7:42
7398 #, no-wrap
7399 msgid "B<ftruncate>(2)"
7400 msgstr "B<ftruncate>(2)"
7401
7402 #. type: Plain text
7403 #: build/C/man7/shm_overview.7:46
7404 msgid ""
7405 "Set the size of the shared memory object.  (A newly created shared memory "
7406 "object has a length of zero.)"
7407 msgstr "共有メモリオブジェクトの大きさを設定する。"
7408
7409 #. type: Plain text
7410 #: build/C/man7/shm_overview.7:50
7411 msgid ""
7412 "Map the shared memory object into the virtual address space of the calling "
7413 "process."
7414 msgstr ""
7415 "呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。"
7416
7417 #. type: TP
7418 #: build/C/man7/shm_overview.7:50
7419 #, no-wrap
7420 msgid "B<munmap>(2)"
7421 msgstr "B<munmap>(2)"
7422
7423 #. type: Plain text
7424 #: build/C/man7/shm_overview.7:54
7425 msgid ""
7426 "Unmap the shared memory object from the virtual address space of the calling "
7427 "process."
7428 msgstr ""
7429 "呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップす"
7430 "る。"
7431
7432 #. type: TP
7433 #: build/C/man7/shm_overview.7:54
7434 #, no-wrap
7435 msgid "B<shm_unlink>(3)"
7436 msgstr "B<shm_unlink>(3)"
7437
7438 #. type: Plain text
7439 #: build/C/man7/shm_overview.7:57
7440 msgid "Remove a shared memory object name."
7441 msgstr "共有メモリオブジェクト名を削除する。"
7442
7443 #. type: TP
7444 #: build/C/man7/shm_overview.7:57
7445 #, no-wrap
7446 msgid "B<close>(2)"
7447 msgstr "B<close>(2)"
7448
7449 #. type: Plain text
7450 #: build/C/man7/shm_overview.7:62
7451 msgid ""
7452 "Close the file descriptor allocated by B<shm_open>(3)  when it is no longer "
7453 "needed."
7454 msgstr ""
7455 "B<shm_open>(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そ"
7456 "のファイルディスクリプタをクローズする。"
7457
7458 #. type: TP
7459 #: build/C/man7/shm_overview.7:62
7460 #, no-wrap
7461 msgid "B<fstat>(2)"
7462 msgstr "B<fstat>(2)"
7463
7464 #. type: Plain text
7465 #: build/C/man7/shm_overview.7:76
7466 msgid ""
7467 "Obtain a I<stat> structure that describes the shared memory object.  Among "
7468 "the information returned by this call are the object's size (I<st_size>), "
7469 "permissions (I<st_mode>), owner (I<st_uid>), and group (I<st_gid>)."
7470 msgstr ""
7471 "その共有メモリオブジェクトについての情報が入った I<stat> 構造体を取得する。 "
7472 "このシステムコールが返す情報には、オブジェクトのサイズ (I<st_size>)、 許可属"
7473 "性 (I<st_mode>)、 所有者 (I<st_uid>)、 グループ (I<st_gid>)  がある。"
7474
7475 #. type: TP
7476 #: build/C/man7/shm_overview.7:76
7477 #, no-wrap
7478 msgid "B<fchown>(2)"
7479 msgstr "B<fchown>(2)"
7480
7481 #. type: Plain text
7482 #: build/C/man7/shm_overview.7:79
7483 msgid "To change the ownership of a shared memory object."
7484 msgstr "共有メモリオブジェクトの所有権を変更する。"
7485
7486 #. type: TP
7487 #: build/C/man7/shm_overview.7:79
7488 #, no-wrap
7489 msgid "B<fchmod>(2)"
7490 msgstr "B<fchmod>(2)"
7491
7492 #. type: Plain text
7493 #: build/C/man7/shm_overview.7:82
7494 msgid "To change the permissions of a shared memory object."
7495 msgstr "共有メモリオブジェクトの許可属性を変更する。"
7496
7497 #. type: SS
7498 #: build/C/man7/shm_overview.7:82
7499 #, no-wrap
7500 msgid "Versions"
7501 msgstr "Versions"
7502
7503 #. type: Plain text
7504 #: build/C/man7/shm_overview.7:84
7505 msgid "POSIX shared memory is supported since Linux 2.4 and glibc 2.2."
7506 msgstr "POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。"
7507
7508 #. type: SS
7509 #: build/C/man7/shm_overview.7:84
7510 #, no-wrap
7511 msgid "Persistence"
7512 msgstr "持続性"
7513
7514 #. type: Plain text
7515 #: build/C/man7/shm_overview.7:89
7516 msgid ""
7517 "POSIX shared memory objects have kernel persistence: a shared memory object "
7518 "will exist until the system is shut down, or until all processes have "
7519 "unmapped the object and it has been deleted with B<shm_unlink>(3)"
7520 msgstr ""
7521 "POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクト"
7522 "は、システムがシャットダウンされるか、 全てのプロセスがそのオブジェクトをアン"
7523 "マップし、 B<shm_unlink>(3)  で削除されるまで、存在し続ける。"
7524
7525 #. type: SS
7526 #: build/C/man7/shm_overview.7:89
7527 #, no-wrap
7528 msgid "Linking"
7529 msgstr "リンク"
7530
7531 #. type: Plain text
7532 #: build/C/man7/shm_overview.7:94
7533 msgid ""
7534 "Programs using the POSIX shared memory API must be compiled with I<cc -lrt> "
7535 "to link against the real-time library, I<librt>."
7536 msgstr ""
7537 "POSIX 共有メモリ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアル"
7538 "タイムライブラリ I<librt> とリンクしなければならない。"
7539
7540 #. type: SS
7541 #: build/C/man7/shm_overview.7:94
7542 #, no-wrap
7543 msgid "Accessing shared memory objects via the file system"
7544 msgstr "ファイルシステム経由での共有メモリオブジェクトへのアクセス"
7545
7546 #. type: Plain text
7547 #: build/C/man7/shm_overview.7:101
7548 msgid ""
7549 "On Linux, shared memory objects are created in a (I<tmpfs>)  virtual file "
7550 "system, normally mounted under I</dev/shm>.  Since kernel 2.6.19, Linux "
7551 "supports the use of access control lists (ACLs)  to control the permissions "
7552 "of objects in the virtual file system."
7553 msgstr ""
7554 "Linux では、共有メモリオブジェクトは通常 I</dev/shm> 以下にマウントされる仮想"
7555 "ファイルシステム (I<tmpfs>)  内に作成される。 カーネル 2.6.19 以降の Linux で"
7556 "は、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リ"
7557 "スト (ACL; access control lists) を使うことができる。"
7558
7559 #. type: Plain text
7560 #: build/C/man7/shm_overview.7:106
7561 msgid ""
7562 "Typically, processes must synchronize their access to a shared memory "
7563 "object, using, for example, POSIX semaphores."
7564 msgstr ""
7565 "通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを"
7566 "使ってプロセス間で同期をとらなければならない。"
7567
7568 #. type: Plain text
7569 #: build/C/man7/shm_overview.7:114
7570 msgid ""
7571 "System V shared memory (B<shmget>(2), B<shmop>(2), etc.) is an older shared "
7572 "memory API.  POSIX shared memory provides a simpler, and better designed "
7573 "interface; on the other hand POSIX shared memory is somewhat less widely "
7574 "available (especially on older systems) than System V shared memory."
7575 msgstr ""
7576 "System V 共有メモリ (B<shmget>(2), B<shmop>(2)  など) は古い共有メモリ API で"
7577 "ある。 POSIX 共有メモリは、より簡単で、うまく設計されたインタフェースを提供し"
7578 "ている。 一方で、POSIX 共有メモリは System V 共有メモリと比べると 利用できる"
7579 "システムが少ない (特に、古いシステムでは少ない)。"
7580
7581 #. type: Plain text
7582 #: build/C/man7/shm_overview.7:127
7583 msgid ""
7584 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7585 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7586 "B<shm_unlink>(3), B<sem_overview>(7)"
7587 msgstr ""
7588 "B<fchmod>(2), B<fchown>(2), B<fstat>(2), B<ftruncate>(2), B<mmap>(2), "
7589 "B<mprotect>(2), B<munmap>(2), B<shmget>(2), B<shmop>(2), B<shm_open>(3), "
7590 "B<shm_unlink>(3), B<sem_overview>(7)"
7591
7592 #. type: TH
7593 #: build/C/man2/shmctl.2:43
7594 #, no-wrap
7595 msgid "SHMCTL"
7596 msgstr "SHMCTL"
7597
7598 #. type: TH
7599 #: build/C/man2/shmctl.2:43
7600 #, no-wrap
7601 msgid "2008-08-07"
7602 msgstr "2008-08-07"
7603
7604 #. type: Plain text
7605 #: build/C/man2/shmctl.2:46
7606 msgid "shmctl - shared memory control"
7607 msgstr "shmctl - 共有メモリ (shared memory) を制御する"
7608
7609 #. type: Plain text
7610 #: build/C/man2/shmctl.2:49 build/C/man2/shmget.2:42
7611 msgid "B<#include E<lt>sys/ipc.hE<gt>>"
7612 msgstr "B<#include E<lt>sys/ipc.hE<gt>>"
7613
7614 #. type: Plain text
7615 #: build/C/man2/shmctl.2:51 build/C/man2/shmget.2:44
7616 msgid "B<#include E<lt>sys/shm.hE<gt>>"
7617 msgstr "B<#include E<lt>sys/shm.hE<gt>>"
7618
7619 #. type: Plain text
7620 #: build/C/man2/shmctl.2:53
7621 msgid ""
7622 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7623 msgstr ""
7624 "B<int shmctl(int >I<shmid>B<, int >I<cmd>B<, struct shmid_ds *>I<buf>B<);>"
7625
7626 #. type: Plain text
7627 #: build/C/man2/shmctl.2:60
7628 msgid ""
7629 "B<shmctl>()  performs the control operation specified by I<cmd> on the "
7630 "shared memory segment whose identifier is given in I<shmid>."
7631 msgstr ""
7632 "B<shmctl>()  は、識別子が I<shmid> の共有メモリ・セグメントに対して I<cmd> で"
7633 "指示した制御命令を実行する。"
7634
7635 #. type: Plain text
7636 #: build/C/man2/shmctl.2:65
7637 msgid ""
7638 "The I<buf> argument is a pointer to a I<shmid_ds> structure, defined in "
7639 "I<E<lt>sys/shm.hE<gt>> as follows:"
7640 msgstr ""
7641 "I<buf> 引き数は、 I<shmid_ds> 構造体へのポインタである。 この構造体は "
7642 "I<E<lt>sys/shm.hE<gt>> で以下のように定義されている"
7643
7644 #. type: Plain text
7645 #: build/C/man2/shmctl.2:79
7646 #, no-wrap
7647 msgid ""
7648 "struct shmid_ds {\n"
7649 "    struct ipc_perm shm_perm;    /* Ownership and permissions */\n"
7650 "    size_t          shm_segsz;   /* Size of segment (bytes) */\n"
7651 "    time_t          shm_atime;   /* Last attach time */\n"
7652 "    time_t          shm_dtime;   /* Last detach time */\n"
7653 "    time_t          shm_ctime;   /* Last change time */\n"
7654 "    pid_t           shm_cpid;    /* PID of creator */\n"
7655 "    pid_t           shm_lpid;    /* PID of last shmat(2)/shmdt(2) */\n"
7656 "    shmatt_t        shm_nattch;  /* No. of current attaches */\n"
7657 "    ...\n"
7658 "};\n"
7659 msgstr ""
7660 "struct shmid_ds {\n"
7661 "    struct ipc_perm shm_perm;    /* 所有権と許可 */\n"
7662 "    size_t          shm_segsz;   /* セグメントのサイズ (バイト) */\n"
7663 "    time_t          shm_atime;   /* 最後の付加 (attach) の時刻 */\n"
7664 "    time_t          shm_dtime;   /* 最後の分離 (detach) の時刻 */\n"
7665 "    time_t          shm_ctime;   /* 最後に変更が行われた時刻 */\n"
7666 "    pid_t           shm_cpid;    /* 作成者 (creator) の PID */\n"
7667 "    pid_t           shm_lpid;    /* 最後の shmat(2)/shmdt(2) の PID */\n"
7668 "    shmatt_t        shm_nattch;  /* 現在付加されている数 */\n"
7669 "    ...\n"
7670 "};\n"
7671
7672 #. type: Plain text
7673 #: build/C/man2/shmctl.2:87
7674 msgid ""
7675 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
7676 "(the highlighted fields are settable using B<IPC_SET>):"
7677 msgstr ""
7678 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
7679 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
7680
7681 #. type: Plain text
7682 #: build/C/man2/shmctl.2:100
7683 #, no-wrap
7684 msgid ""
7685 "struct ipc_perm {\n"
7686 "    key_t          __key;    /* Key supplied to shmget(2) */\n"
7687 "    uid_t          B<uid>;      /* Effective UID of owner */\n"
7688 "    gid_t          B<gid>;      /* Effective GID of owner */\n"
7689 "    uid_t          cuid;     /* Effective UID of creator */\n"
7690 "    gid_t          cgid;     /* Effective GID of creator */\n"
7691 "    unsigned short B<mode>;     /* B<Permissions> + SHM_DEST and\n"
7692 "                                SHM_LOCKED flags */\n"
7693 "    unsigned short __seq;    /* Sequence number */\n"
7694 "};\n"
7695 msgstr ""
7696 "struct ipc_perm {\n"
7697 "    key_t          __key;    /* shmget(2) に与えられるキー */\n"
7698 "    uid_t          B<uid>;      /* 所有者の実効 UID */\n"
7699 "    gid_t          B<gid>;      /* 所有者の実効 GID */\n"
7700 "    uid_t          cuid;     /* 作成者の実効 UID */\n"
7701 "    gid_t          cgid;     /* 作成者の実効 GID */\n"
7702 "    unsigned short B<mode>;     /* B<許可> + SHM_DEST と\n"
7703 "                                SHM_LOCKED フラグ */\n"
7704 "    unsigned short __seq;    /* シーケンス番号 */\n"
7705 "};\n"
7706
7707 #. type: Plain text
7708 #: build/C/man2/shmctl.2:106
7709 msgid "Valid values for I<cmd> are:"
7710 msgstr "I<cmd> として有効な値は以下の通り:"
7711
7712 #. type: TP
7713 #: build/C/man2/shmctl.2:107
7714 #, no-wrap
7715 msgid "B<IPC_STAT>"
7716 msgstr "B<IPC_STAT>"
7717
7718 #. type: Plain text
7719 #: build/C/man2/shmctl.2:116
7720 msgid ""
7721 "Copy information from the kernel data structure associated with I<shmid> "
7722 "into the I<shmid_ds> structure pointed to by I<buf>.  The caller must have "
7723 "read permission on the shared memory segment."
7724 msgstr ""
7725 "I<shmid> に関連づけられたカーネルデータ構造体の情報を I<buf> で指された "
7726 "I<shmid_ds> 構造体にコピーする。 呼び出し元は共有メモリ・セグメントに対する "
7727 "読み込み許可を持たなければならない。"
7728
7729 #. type: TP
7730 #: build/C/man2/shmctl.2:116
7731 #, no-wrap
7732 msgid "B<IPC_SET>"
7733 msgstr "B<IPC_SET>"
7734
7735 #. type: Plain text
7736 #: build/C/man2/shmctl.2:134
7737 msgid ""
7738 "Write the values of some members of the I<shmid_ds> structure pointed to by "
7739 "I<buf> to the kernel data structure associated with this shared memory "
7740 "segment, updating also its I<shm_ctime> member.  The following fields can be "
7741 "changed: I<shm_perm.uid>, I<shm_perm.gid>, and (the least significant 9 bits "
7742 "of) I<shm_perm.mode>.  The effective UID of the calling process must match "
7743 "the owner (I<shm_perm.uid>)  or creator (I<shm_perm.cuid>)  of the shared "
7744 "memory segment, or the caller must be privileged."
7745 msgstr ""
7746 "I<buf> によって指される I<shmid_ds> 構造体のいくつかのメンバーの値を、 この共"
7747 "有メモリ・セグメントに関連づけられたカーネルデータ構造体に書き込み、 "
7748 "I<shm_ctime> メンバーも更新する。 以下のフィールドは変更できる。 I<shm_perm."
7749 "uid>, I<shm_perm.gid>, I<shm_perm.mode> (の最下位 9 ビット)。 呼び出したプロ"
7750 "セスの実効 UID が所有者 (I<shm_perm.uid>)  または作成者 (I<shm_perm.cuid>)  "
7751 "と一致するか、呼び出し元が特権を持たなければならない。"
7752
7753 #. type: TP
7754 #: build/C/man2/shmctl.2:134
7755 #, no-wrap
7756 msgid "B<IPC_RMID>"
7757 msgstr "B<IPC_RMID>"
7758
7759 #. type: Plain text
7760 #: build/C/man2/shmctl.2:151
7761 msgid ""
7762 "Mark the segment to be destroyed.  The segment will only actually be "
7763 "destroyed after the last process detaches it (i.e., when the I<shm_nattch> "
7764 "member of the associated structure I<shmid_ds> is zero).  The caller must be "
7765 "the owner or creator, or be privileged.  If a segment has been marked for "
7766 "destruction, then the (nonstandard)  B<SHM_DEST> flag of the I<shm_perm."
7767 "mode> field in the associated data structure retrieved by B<IPC_STAT> will "
7768 "be set."
7769 msgstr ""
7770 "セグメントに破棄済みのマークを付ける。 セグメントは、実際には最後プロセスがセ"
7771 "グメントを分離した (関連する I<shmid_ds> 構造体の I<shm_nattch> メンバーが 0 "
7772 "になった) 後でのみ破棄される。 呼び出し元は所有者か作成者であるか、特権を持た"
7773 "なければならない。 セグメントに破棄のマークが付けられると、 関連するデータ構"
7774 "造体において I<shm_perm.mode> フィールドの (標準ではない)  B<SHM_DEST> フラグ"
7775 "が設定される。 このデータ構造体は B<IPC_STAT> で取得される。"
7776
7777 #. type: Plain text
7778 #: build/C/man2/shmctl.2:154
7779 msgid ""
7780 "The caller I<must> ensure that a segment is eventually destroyed; otherwise "
7781 "its pages that were faulted in will remain in memory or swap."
7782 msgstr ""
7783 "呼び出し元は最終的にはセグメントを忘れずに破棄I<しなければならない>。 そうで"
7784 "なれば、フォールト (fault) されたページは メモリかスワップ (swap) に残り続け"
7785 "る。"
7786
7787 #. type: TP
7788 #: build/C/man2/shmctl.2:154
7789 #, no-wrap
7790 msgid "B<IPC_INFO> (Linux-specific)"
7791 msgstr "B<IPC_INFO> (Linux 固有)"
7792
7793 #. type: Plain text
7794 #: build/C/man2/shmctl.2:167
7795 msgid ""
7796 "Returns information about system-wide shared memory limits and parameters in "
7797 "the structure pointed to by I<buf>.  This structure is of type I<shminfo> "
7798 "(thus, a cast is required), defined in I<E<lt>sys/shm.hE<gt>> if the "
7799 "B<_GNU_SOURCE> feature test macro is defined:"
7800 msgstr ""
7801 "システム全体での共有メモリの制限とパラメータに関する情報を、 I<buf> が指す構"
7802 "造体に入れて返す。 この構造体は I<shminfo> 型である (そのためキャストが必要で"
7803 "ある)。 I<shminfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7804 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7805
7806 #. type: Plain text
7807 #: build/C/man2/shmctl.2:181
7808 #, no-wrap
7809 msgid ""
7810 "struct  shminfo {\n"
7811 "    unsigned long shmmax; /* Maximum segment size */\n"
7812 "    unsigned long shmmin; /* Minimum segment size;\n"
7813 "                             always 1 */\n"
7814 "    unsigned long shmmni; /* Maximum number of segments */\n"
7815 "    unsigned long shmseg; /* Maximum number of segments\n"
7816 "                             that a process can attach;\n"
7817 "                             unused within kernel */\n"
7818 "    unsigned long shmall; /* Maximum number of pages of\n"
7819 "                             shared memory, system-wide */\n"
7820 "};\n"
7821 msgstr ""
7822 "struct  shminfo {\n"
7823 "    unsigned long shmmax; /* 最大セグメントサイズ */\n"
7824 "    unsigned long shmmin; /* 最小セグメントサイズ。\n"
7825 "                             常に 1 */\n"
7826 "    unsigned long shmmni; /* 最大セグメント数 */\n"
7827 "    unsigned long shmseg; /* プロセスが付加できる\n"
7828 "                             セグメントの最大数。\n"
7829 "                             カーネル内では未使用 */\n"
7830 "    unsigned long shmall; /* 共有メモリの最大ページ数。\n"
7831 "                             システム全体での値 */\n"
7832 "};\n"
7833
7834 #. type: Plain text
7835 #: build/C/man2/shmctl.2:194
7836 msgid ""
7837 "The I<shmmni>, I<shmmax>, and I<shmall> settings can be changed via I</proc> "
7838 "files of the same name; see B<proc>(5)  for details."
7839 msgstr ""
7840 "設定 I<shmmni>, I<shmmax>, I<shmall> は I</proc> にある同じ名前のファイル経由"
7841 "で変更可能である。 詳しくは B<proc>(5)  を参照。"
7842
7843 #. type: TP
7844 #: build/C/man2/shmctl.2:194
7845 #, no-wrap
7846 msgid "B<SHM_INFO> (Linux-specific)"
7847 msgstr "B<SHM_INFO> (Linux 固有)"
7848
7849 #. type: Plain text
7850 #: build/C/man2/shmctl.2:205
7851 msgid ""
7852 "Returns a I<shm_info> structure whose fields contain information about "
7853 "system resources consumed by shared memory.  This structure is defined in "
7854 "I<E<lt>sys/shm.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
7855 msgstr ""
7856 "共有メモリが消費しているシステム資源に関する情報を 格納した I<shm_info> 構造"
7857 "体を返す。 この構造体は、 B<_GNU_SOURCE> 機能検査マクロが定義された場合に "
7858 "I<E<lt>sys/shm.hE<gt>> で以下のように定義される:"
7859
7860 #. type: Plain text
7861 #: build/C/man2/shmctl.2:222
7862 #, no-wrap
7863 msgid ""
7864 "struct shm_info {\n"
7865 "    int           used_ids; /* # of currently existing\n"
7866 "                               segments */\n"
7867 "    unsigned long shm_tot;  /* Total number of shared\n"
7868 "                               memory pages */\n"
7869 "    unsigned long shm_rss;  /* # of resident shared\n"
7870 "                               memory pages */\n"
7871 "    unsigned long shm_swp;  /* # of swapped shared\n"
7872 "                               memory pages */\n"
7873 "    unsigned long swap_attempts;\n"
7874 "                            /* Unused since Linux 2.4 */\n"
7875 "    unsigned long swap_successes;\n"
7876 "                            /* Unused since Linux 2.4 */\n"
7877 "};\n"
7878 msgstr ""
7879 "struct shm_info {\n"
7880 "    int           used_ids; /* 現在存在するセグメント数 */\n"
7881 "    unsigned long shm_tot;  /* 共有メモリのページ総数 */\n"
7882 "    unsigned long shm_rss;  /* メモリ上にある (スワップされて\n"
7883 "                               いない) 共有メモリページ数 */\n"
7884 "    unsigned long shm_swp;  /* スワップされている共有メモリ\n"
7885 "                               ページ数 */\n"
7886 "    unsigned long swap_attempts;\n"
7887 "                            /* Linux 2.4 以降では未使用 */\n"
7888 "    unsigned long swap_successes;\n"
7889 "                            /* Linux 2.4 以降では未使用 */\n"
7890 "};\n"
7891
7892 #. type: TP
7893 #: build/C/man2/shmctl.2:224
7894 #, no-wrap
7895 msgid "B<SHM_STAT> (Linux-specific)"
7896 msgstr "B<SHM_STAT> (Linux 固有)"
7897
7898 #. type: Plain text
7899 #: build/C/man2/shmctl.2:235
7900 msgid ""
7901 "Returns a I<shmid_ds> structure as for B<IPC_STAT>.  However, the I<shmid> "
7902 "argument is not a segment identifier, but instead an index into the kernel's "
7903 "internal array that maintains information about all shared memory segments "
7904 "on the system."
7905 msgstr ""
7906 "B<IPC_STAT> と同じく I<shmid_ds> 構造体を返す。 但し、 I<shmid> 引き数は、セ"
7907 "グメント識別子ではなく、システム上の全ての共有メモリ セグメントに関する情報を"
7908 "管理するカーネルの内部配列へのインデックス である。"
7909
7910 #. type: Plain text
7911 #: build/C/man2/shmctl.2:238
7912 msgid ""
7913 "The caller can prevent or allow swapping of a shared memory segment with the "
7914 "following I<cmd> values:"
7915 msgstr ""
7916 "呼び出し元は、I<cmd> に以下の値を指定することで、共有メモリ・セグメントが ス"
7917 "ワップされることを防止したり、許可したりできる:"
7918
7919 #. type: TP
7920 #: build/C/man2/shmctl.2:239
7921 #, no-wrap
7922 msgid "B<SHM_LOCK> (Linux-specific)"
7923 msgstr "B<SHM_LOCK> (Linux 固有)"
7924
7925 #. type: Plain text
7926 #: build/C/man2/shmctl.2:251
7927 msgid ""
7928 "Prevent swapping of the shared memory segment.  The caller must fault in any "
7929 "pages that are required to be present after locking is enabled.  If a "
7930 "segment has been locked, then the (nonstandard)  B<SHM_LOCKED> flag of the "
7931 "I<shm_perm.mode> field in the associated data structure retrieved by "
7932 "B<IPC_STAT> will be set."
7933 msgstr ""
7934 "共有メモリ・セグメントをスワップすることを防止する。 ロックが有効になった後、"
7935 "呼び出し元は、 存在することが要求された全てのページをフォールトさせなければな"
7936 "らない。 セグメントがロックされると、 関連するデータ構造体において "
7937 "I<shm_perm.mode> フィールドの (標準的ではない)  B<SHM_LOCKED> フラグが設定さ"
7938 "れる。 このデータ構造体は B<IPC_STAT> で取得される。"
7939
7940 #. type: TP
7941 #: build/C/man2/shmctl.2:251
7942 #, no-wrap
7943 msgid "B<SHM_UNLOCK> (Linux-specific)"
7944 msgstr "B<SHM_UNLOCK> (Linux 固有)"
7945
7946 #. type: Plain text
7947 #: build/C/man2/shmctl.2:254
7948 msgid "Unlock the segment, allowing it to be swapped out."
7949 msgstr "セグメントのロックを解除し、スワップ・アウトすることを可能にする。"
7950
7951 #.  There was some weirdness in 2.6.9: SHM_LOCK and SHM_UNLOCK could
7952 #.  be applied to a segment, regardless of ownership of the segment.
7953 #.  This was a botch-up in the move to RLIMIT_MEMLOCK, and was fixed
7954 #.  in 2.6.10.  MTK, May 2005
7955 #. type: Plain text
7956 #: build/C/man2/shmctl.2:272
7957 msgid ""
7958 "In kernels before 2.6.10, only a privileged process could employ B<SHM_LOCK> "
7959 "and B<SHM_UNLOCK>.  Since kernel 2.6.10, an unprivileged process can employ "
7960 "these operations if its effective UID matches the owner or creator UID of "
7961 "the segment, and (for B<SHM_LOCK>)  the amount of memory to be locked falls "
7962 "within the B<RLIMIT_MEMLOCK> resource limit (see B<setrlimit>(2))."
7963 msgstr ""
7964 "2.6.10 より前のカーネルでは、特権プロセスだけが B<SHM_LOCK> と B<SHM_UNLOCK> "
7965 "を利用することができた。 2.6.10 以降のカーネルでは、非特権プロセスであっても"
7966 "次の条件を満たせば これらの操作を利用することができる。その条件とは、プロセス"
7967 "の実効 UID がそのセグメントの所有者もしくは作成者の UID と一致し、 "
7968 "(B<SHM_LOCK> の場合には) ロックするメモリの合計が B<RLIMIT_MEMLOCK> リソース"
7969 "上限 (B<setrlimit>(2)  参照) の範囲内に入っていることである。"
7970
7971 #. type: Plain text
7972 #: build/C/man2/shmctl.2:290
7973 msgid ""
7974 "A successful B<IPC_INFO> or B<SHM_INFO> operation returns the index of the "
7975 "highest used entry in the kernel's internal array recording information "
7976 "about all shared memory segments.  (This information can be used with "
7977 "repeated B<SHM_STAT> operations to obtain information about all shared "
7978 "memory segments on the system.)  A successful B<SHM_STAT> operation returns "
7979 "the identifier of the shared memory segment whose index was given in "
7980 "I<shmid>.  Other operations return 0 on success."
7981 msgstr ""
7982 "B<IPC_INFO> と B<SHM_INFO> 操作は、成功すると、全ての共有メモリセグメントに関"
7983 "する情報を 管理しているカーネルの内部配列の使用中エントリのインデックスの う"
7984 "ち最大値を返す (この情報は、システムの全ての共有メモリセグメントに関する情報"
7985 "を 取得するために、 B<SHM_STAT> 操作を繰り返し実行する際に使用できる)。 "
7986 "B<SHM_STAT> 操作は、成功すると、 I<shmid> で指定されたインデックスを持つ共有"
7987 "メモリセグメントの識別子を返す。 他の操作は、成功の場合 0 を返す。"
7988
7989 #. type: Plain text
7990 #: build/C/man2/shmctl.2:294
7991 msgid "On error, -1 is returned, and I<errno> is set appropriately."
7992 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
7993
7994 #. type: Plain text
7995 #: build/C/man2/shmctl.2:303
7996 msgid ""
7997 "B<IPC_STAT> or B<SHM_STAT> is requested and I<shm_perm.mode> does not allow "
7998 "read access for I<shmid>, and the calling process does not have the "
7999 "B<CAP_IPC_OWNER> capability."
8000 msgstr ""
8001 "B<IPC_STAT> または B<SHM_STAT> が要求され、 I<shm_perm.mode> が I<shmid> への"
8002 "読み込みアクセスを許しておらず、 かつ呼び出したプロセスが B<CAP_IPC_OWNER> "
8003 "ケーパビリティ (capability) を持っていない。"
8004
8005 #. type: Plain text
8006 #: build/C/man2/shmctl.2:314
8007 msgid ""
8008 "The argument I<cmd> has value B<IPC_SET> or B<IPC_STAT> but the address "
8009 "pointed to by I<buf> isn't accessible."
8010 msgstr ""
8011 "I<cmd> 引き数に B<IPC_SET> か B<IPC_STAT> が指定されたが I<buf> で指されてい"
8012 "るアドレスにアクセスできない。"
8013
8014 #. type: TP
8015 #: build/C/man2/shmctl.2:314
8016 #, no-wrap
8017 msgid "B<EIDRM>"
8018 msgstr "B<EIDRM>"
8019
8020 #. type: Plain text
8021 #: build/C/man2/shmctl.2:317
8022 msgid "I<shmid> points to a removed identifier."
8023 msgstr "I<shmid> が削除 (remove) された識別子 (identifier) を指している。"
8024
8025 #. type: Plain text
8026 #: build/C/man2/shmctl.2:326
8027 msgid ""
8028 "I<shmid> is not a valid identifier, or I<cmd> is not a valid command.  Or: "
8029 "for a B<SHM_STAT> operation, the index value specified in I<shmid> referred "
8030 "to an array slot that is currently unused."
8031 msgstr ""
8032 "I<shmid> が有効な識別子でないか、 I<cmd> が有効なコマンドでない。 もしくは、 "
8033 "B<SHM_STAT> 操作の場合に、 I<shmid> で指定されたインデックス値が現在未使用の"
8034 "配列のスロットを参照していた。"
8035
8036 #. type: Plain text
8037 #: build/C/man2/shmctl.2:337
8038 msgid ""
8039 "(In kernels since 2.6.9), B<SHM_LOCK> was specified and the size of the to-"
8040 "be-locked segment would mean that the total bytes in locked shared memory "
8041 "segments would exceed the limit for the real user ID of the calling "
8042 "process.  This limit is defined by the B<RLIMIT_MEMLOCK> soft resource limit "
8043 "(see B<setrlimit>(2))."
8044 msgstr ""
8045 "(2.6.9 以降のカーネルにおいて)  B<SHM_LOCK> が指定され、 ロックされる予定のセ"
8046 "グメントのサイズ (ロックされる共有メモリ・セグメントの合計バイト数) が、 呼び"
8047 "出したプロセスの実ユーザー ID についての制限を超えた。 この制限は "
8048 "B<RLIMIT_MEMLOCK> ソフト資源制限で定義される (B<setrlimit>(2)  を参照)。"
8049
8050 #. type: TP
8051 #: build/C/man2/shmctl.2:337
8052 #, no-wrap
8053 msgid "B<EOVERFLOW>"
8054 msgstr "B<EOVERFLOW>"
8055
8056 #. type: Plain text
8057 #: build/C/man2/shmctl.2:342
8058 msgid ""
8059 "B<IPC_STAT> is attempted, and the GID or UID value is too large to be stored "
8060 "in the structure pointed to by I<buf>."
8061 msgstr ""
8062 "B<IPC_STAT> が試みられ、GID や UID の値が I<buf> で指示される構造体に格納する"
8063 "には大き過ぎる。"
8064
8065 #. type: Plain text
8066 #: build/C/man2/shmctl.2:354
8067 msgid ""
8068 "B<IPC_SET> or B<IPC_RMID> is attempted, and the effective user ID of the "
8069 "calling process is not that of the creator (found in I<shm_perm.cuid>), or "
8070 "the owner (found in I<shm_perm.uid>), and the process was not privileged "
8071 "(Linux: did not have the B<CAP_SYS_ADMIN> capability)."
8072 msgstr ""
8073 "B<IPC_SET> か B<IPC_RMID> が試みられ、 呼び出したプロセスの実効ユーザー ID が"
8074 "作成者 (I<shm_perm.cuid>)  でも所有者 (I<shm_perm.uid>)  でもなく、プロセスが"
8075 "特権を持たない (Linux では B<CAP_SYS_ADMIN> ケーパビリティを持たない)。"
8076
8077 #. type: Plain text
8078 #: build/C/man2/shmctl.2:366
8079 msgid ""
8080 "Or (in kernels before 2.6.9), B<SHM_LOCK> or B<SHM_UNLOCK> was specified, "
8081 "but the process was not privileged (Linux: did not have the B<CAP_IPC_LOCK> "
8082 "capability).  (Since Linux 2.6.9, this error can also occur if the "
8083 "B<RLIMIT_MEMLOCK> is 0 and the caller is not privileged.)"
8084 msgstr ""
8085 "または (2.6.9 より前のカーネルで)  B<SHM_LOCK> または B<SHM_UNLOCK> が指定さ"
8086 "れているが、プロセスが特権を持たない (Linux では B<CAP_IPC_LOCK> ケーパビリ"
8087 "ティを持たない)。 (Linux 2.6.9 以降では、 B<RLIMIT_MEMLOCK> が 0 で呼び出し元"
8088 "が特権を持たない場合にも、このエラーが起こる。)"
8089
8090 #.  SVr4 documents an additional error condition EMFILE.
8091 #. type: Plain text
8092 #: build/C/man2/shmctl.2:371 build/C/man2/shmget.2:232
8093 #: build/C/man2/shmop.2:229
8094 msgid "SVr4, POSIX.1-2001."
8095 msgstr "SVr4, POSIX.1-2001."
8096
8097 #. type: Plain text
8098 #: build/C/man2/shmctl.2:382
8099 msgid ""
8100 "The B<IPC_INFO>, B<SHM_STAT> and B<SHM_INFO> operations are used by the "
8101 "B<ipcs>(1)  program to provide information on allocated resources.  In the "
8102 "future these may modified or moved to a /proc file system interface."
8103 msgstr ""
8104 "B<IPC_INFO>, B<SHM_STAT>, B<SHM_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当"
8105 "て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変"
8106 "更されたり、 /proc ファイルシステムのインタフェースに移動されるかもしれない。"
8107
8108 #. type: Plain text
8109 #: build/C/man2/shmctl.2:390
8110 msgid ""
8111 "Linux permits a process to attach (B<shmat>(2))  a shared memory segment "
8112 "that has already been marked for deletion using I<shmctl(IPC_RMID)>.  This "
8113 "feature is not available on other UNIX implementations; portable "
8114 "applications should avoid relying on it."
8115 msgstr ""
8116 "Linux では、 I<shmctl(IPC_RMID)> を使ってすでに削除マークがつけられている共有"
8117 "メモリ・セグメントを あるプロセスが付加 (attach)  (B<shmat>(2))  することを許"
8118 "可している。 この機能は他の UNIX の実装では利用できない。 移植性を考慮したア"
8119 "プリケーションではこれに依存しないようにすべきである。"
8120
8121 #. type: Plain text
8122 #: build/C/man2/shmctl.2:403
8123 msgid ""
8124 "Various fields in a I<struct shmid_ds> were typed as I<short> under Linux "
8125 "2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a "
8126 "recompilation under glibc-2.1.91 or later should suffice.  (The kernel "
8127 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
8128 msgstr ""
8129 "I<構造体 shmid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
8130 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
8131 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
8132 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
8133
8134 #. type: Plain text
8135 #: build/C/man2/shmctl.2:410
8136 msgid ""
8137 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
8138 "B<svipc>(7)"
8139 msgstr ""
8140 "B<mlock>(2), B<setrlimit>(2), B<shmget>(2), B<shmop>(2), B<capabilities>(7), "
8141 "B<shm_overview>(7), B<svipc>(7)"
8142
8143 #. type: TH
8144 #: build/C/man2/shmget.2:36
8145 #, no-wrap
8146 msgid "SHMGET"
8147 msgstr "SHMGET"
8148
8149 #. type: TH
8150 #: build/C/man2/shmget.2:36
8151 #, no-wrap
8152 msgid "2006-05-02"
8153 msgstr "2006-05-02"
8154
8155 #. type: Plain text
8156 #: build/C/man2/shmget.2:39
8157 msgid "shmget - allocates a shared memory segment"
8158 msgstr "shmget - 共有メモリ・セグメントを割り当てる"
8159
8160 #. type: Plain text
8161 #: build/C/man2/shmget.2:46
8162 msgid "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
8163 msgstr "B<int shmget(key_t >I<key>B<, size_t >I<size>B<, int >I<shmflg>B<);>"
8164
8165 #. type: Plain text
8166 #: build/C/man2/shmget.2:70
8167 msgid ""
8168 "B<shmget>()  returns the identifier of the shared memory segment associated "
8169 "with the value of the argument I<key>.  A new shared memory segment, with "
8170 "size equal to the value of I<size> rounded up to a multiple of B<PAGE_SIZE>, "
8171 "is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't "
8172 "B<IPC_PRIVATE>, no shared memory segment corresponding to I<key> exists, and "
8173 "B<IPC_CREAT> is specified in I<shmflg>."
8174 msgstr ""
8175 "B<shmget>()  は I<key> 引き数に対応する共有メモリ・セグメントの識別子を返"
8176 "す。 I<key> の値が B<IPC_PRIVATE> の場合、もしくは I<key> に対応する共有メモ"
8177 "リ・セグメントが存在せず、 I<shmflg> に B<IPC_CREAT> が指定されていた場合、 "
8178 "新しい共有メモリ・セグメントを作成する。 作成される共有メモリ・セグメント"
8179 "は、 I<size> 引き数の値を B<PAGE_SIZE> の倍数へと切り上げた (round up) 大きさ"
8180 "となる。"
8181
8182 #. type: Plain text
8183 #: build/C/man2/shmget.2:89
8184 msgid ""
8185 "If I<shmflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a shared memory "
8186 "segment already exists for I<key>, then B<shmget>()  fails with I<errno> set "
8187 "to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT "
8188 "| O_EXCL> for B<open>(2).)"
8189 msgstr ""
8190 "I<shmflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
8191 "応する共有メモリ・セグメントが既に存在すると、 B<shmget>()  は失敗し、 "
8192 "I<errno> に B<EEXIST> が設定される (これは B<open>(2)  に B<O_CREAT | "
8193 "O_EXCL> を指定した場合の動作と同じである)。"
8194
8195 #. type: Plain text
8196 #: build/C/man2/shmget.2:93
8197 msgid "The value I<shmflg> is composed of:"
8198 msgstr "I<shmflg> は以下の内容から構成される:"
8199
8200 #. type: TP
8201 #: build/C/man2/shmget.2:93
8202 #, no-wrap
8203 msgid "B<IPC_CREAT>"
8204 msgstr "B<IPC_CREAT>"
8205
8206 #. type: Plain text
8207 #: build/C/man2/shmget.2:100
8208 msgid ""
8209 "to create a new segment.  If this flag is not used, then B<shmget>()  will "
8210 "find the segment associated with I<key> and check to see if the user has "
8211 "permission to access the segment."
8212 msgstr ""
8213 "新しいセグメントを作成する。このフラグが指定されなかった場合、 B<shmget>()  "
8214 "は I<key> に対応するセグメントを探し、 ユーザがそのセグメントにアクセスする許"
8215 "可があるかどうかをチェックする。"
8216
8217 #. type: TP
8218 #: build/C/man2/shmget.2:100
8219 #, no-wrap
8220 msgid "B<IPC_EXCL>"
8221 msgstr "B<IPC_EXCL>"
8222
8223 #. type: Plain text
8224 #: build/C/man2/shmget.2:103
8225 msgid "used with B<IPC_CREAT> to ensure failure if the segment already exists."
8226 msgstr ""
8227 "B<IPC_CREAT> と共に使用し、セグメントが既に存在した場合には 失敗することを保"
8228 "証する。"
8229
8230 #. type: TP
8231 #: build/C/man2/shmget.2:103
8232 #, no-wrap
8233 msgid "I<mode_flags>"
8234 msgstr "I<mode_flags>"
8235
8236 #. type: Plain text
8237 #: build/C/man2/shmget.2:113
8238 msgid ""
8239 "(least significant 9 bits)  specifying the permissions granted to the owner, "
8240 "group, and world.  These bits have the same format, and the same meaning, as "
8241 "the I<mode> argument of B<open>(2).  Presently, the execute permissions are "
8242 "not used by the system."
8243 msgstr ""
8244 "(下位 9 ビット)  所有者、グループ、他人 (world) への許可を指定する。 これらの"
8245 "ビットは B<open>(2)  の I<mode> 引き数と同じ形式で同じ意味を持つ。 今のとこ"
8246 "ろ、システムは実行 (execute) 許可を参照しない。"
8247
8248 #. type: TP
8249 #: build/C/man2/shmget.2:113
8250 #, no-wrap
8251 msgid "B<SHM_HUGETLB> (since Linux 2.6)"
8252 msgstr "B<SHM_HUGETLB> (Linux 2.6 以降)"
8253
8254 #. type: Plain text
8255 #: build/C/man2/shmget.2:119
8256 msgid ""
8257 "Allocate the segment using \"huge pages.\" See the kernel source file "
8258 "I<Documentation/vm/hugetlbpage.txt> for further information."
8259 msgstr ""
8260 "\"ヒュージページ (huge page)\" を使うセグメントを割り当てる。 詳細な情報は、"
8261 "カーネル・ソースのファイル I<Documentation/vm/hugetlbpage.txt> を参照。"
8262
8263 #. type: TP
8264 #: build/C/man2/shmget.2:119
8265 #, no-wrap
8266 msgid "B<SHM_NORESERVE> (since Linux 2.6.15)"
8267 msgstr "B<SHM_NORESERVE> (Linux 2.6.15 以降)"
8268
8269 #.  As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also
8270 #.  specified.
8271 #. type: Plain text
8272 #: build/C/man2/shmget.2:138
8273 msgid ""
8274 "This flag serves the same purpose as the B<mmap>(2)  B<MAP_NORESERVE> flag.  "
8275 "Do not reserve swap space for this segment.  When swap space is reserved, "
8276 "one has the guarantee that it is possible to modify the segment.  When swap "
8277 "space is not reserved one might get B<SIGSEGV> upon a write if no physical "
8278 "memory is available.  See also the discussion of the file I</proc/sys/vm/"
8279 "overcommit_memory> in B<proc>(5)."
8280 msgstr ""
8281 "このフラグは、 B<mmap>(2)  の B<MAP_NORESERVE> フラグと同じ役割を果たす。 こ"
8282 "のセグメントに対するスワップ空間の予約を行わない。 スワップ空間を予約した場合"
8283 "は、そのセグメントの変更が必ず成功することが 保証される。スワップ空間の予約を"
8284 "行わなかった場合は、物理メモリに空きが ないと書き込み時に B<SIGSEGV> を受け取"
8285 "る可能性がある。 B<proc>(5)  にある I</proc/sys/vm/overcommit_memory> ファイ"
8286 "ルに関する議論も参照のこと。"
8287
8288 #. type: Plain text
8289 #: build/C/man2/shmget.2:146
8290 msgid ""
8291 "When a new shared memory segment is created, its contents are initialized to "
8292 "zero values, and its associated data structure, I<shmid_ds> (see B<shmctl>"
8293 "(2)), is initialized as follows:"
8294 msgstr ""
8295 "共有メモリ・セグメントが新たに作成される際、 共有メモリ・セグメントの内容は "
8296 "0 で初期化され、 関連情報を保持するデータ構造体 I<shmid_ds> は以下のように初"
8297 "期化される。"
8298
8299 #. type: Plain text
8300 #: build/C/man2/shmget.2:151
8301 msgid ""
8302 "I<shm_perm.cuid> and I<shm_perm.uid> are set to the effective user ID of the "
8303 "calling process."
8304 msgstr ""
8305 "I<shm_perm.cuid> と I<shm_perm.uid> に呼び出し元プロセスの実効 (effective) "
8306 "ユーザーID を設定する。"
8307
8308 #. type: Plain text
8309 #: build/C/man2/shmget.2:156
8310 msgid ""
8311 "I<shm_perm.cgid> and I<shm_perm.gid> are set to the effective group ID of "
8312 "the calling process."
8313 msgstr ""
8314 "I<shm_perm.cgid> と I<shm_perm.gid> に呼び出し元プロセスの実効グループID を設"
8315 "定する。"
8316
8317 #. type: Plain text
8318 #: build/C/man2/shmget.2:161
8319 msgid ""
8320 "The least significant 9 bits of I<shm_perm.mode> are set to the least "
8321 "significant 9 bit of I<shmflg>."
8322 msgstr ""
8323 "I<shm_perm.mode> の下位 9 ビットに I<shmflg> の下位 9 ビットを設定する。"
8324
8325 #. type: Plain text
8326 #: build/C/man2/shmget.2:165
8327 msgid "I<shm_segsz> is set to the value of I<size>."
8328 msgstr "I<shm_segsz> に I<size> の値を設定する。"
8329
8330 #. type: Plain text
8331 #: build/C/man2/shmget.2:172
8332 msgid "I<shm_lpid>, I<shm_nattch>, I<shm_atime> and I<shm_dtime> are set to 0."
8333 msgstr ""
8334 "I<shm_lpid>, I<shm_nattch>, I<shm_atime>, I<shm_dtime> に 0 を設定する。"
8335
8336 #. type: Plain text
8337 #: build/C/man2/shmget.2:175
8338 msgid "I<shm_ctime> is set to the current time."
8339 msgstr "I<shm_ctime> に現在の時刻を設定する。"
8340
8341 #. type: Plain text
8342 #: build/C/man2/shmget.2:178
8343 msgid ""
8344 "If the shared memory segment already exists, the permissions are verified, "
8345 "and a check is made to see if it is marked for destruction."
8346 msgstr ""
8347 "共有メモリ・セグメントが既に存在する場合、アクセス許可の検査と、 破壊 "
8348 "(destruction) マークがつけられていないかのチェックが行われる。"
8349
8350 #. type: Plain text
8351 #: build/C/man2/shmget.2:182
8352 msgid ""
8353 "A valid segment identifier, I<shmid>, is returned on success, -1 on error."
8354 msgstr ""
8355 "成功した場合、有効なセグメント識別子 I<shmid> が返される。エラーの場合、 -1 "
8356 "が返される。"
8357
8358 #. type: Plain text
8359 #: build/C/man2/shmget.2:186
8360 msgid "On failure, I<errno> is set to one of the following:"
8361 msgstr "失敗した場合は I<errno> が以下のどれかに設定される:"
8362
8363 #. type: Plain text
8364 #: build/C/man2/shmget.2:192
8365 msgid ""
8366 "The user does not have permission to access the shared memory segment, and "
8367 "does not have the B<CAP_IPC_OWNER> capability."
8368 msgstr ""
8369 "ユーザーはその共有メモリ・セグメントへのアクセス許可を持たず、 "
8370 "B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
8371
8372 #. type: Plain text
8373 #: build/C/man2/shmget.2:196
8374 msgid "B<IPC_CREAT | IPC_EXCL> was specified and the segment exists."
8375 msgstr ""
8376 "B<IPC_CREAT | IPC_EXCL> が指定されていたが、そのセグメントが既に存在する。"
8377
8378 #. type: Plain text
8379 #: build/C/man2/shmget.2:202
8380 msgid ""
8381 "A new segment was to be created and I<size> E<lt> B<SHMMIN> or I<size> E<gt> "
8382 "B<SHMMAX>, or no new segment was to be created, a segment with given key "
8383 "existed, but I<size> is greater than the size of that segment."
8384 msgstr ""
8385 "新しいセグメントを作成しようとした際に I<size> E<lt> B<SHMMIN> または "
8386 "I<size> E<gt> B<SHMMAX> であった。 もしくは、指定されたキーに対応するセグメン"
8387 "トが既に存在して、新しい セグメントを作成しようとはしなかったが、I<size> が存"
8388 "在するセグメントの サイズよりも大きかった。"
8389
8390 #. type: Plain text
8391 #: build/C/man2/shmget.2:211
8392 msgid ""
8393 "No segment exists for the given I<key>, and B<IPC_CREAT> was not specified."
8394 msgstr ""
8395 "指定された I<key> に対応するセグメントが存在せず、 B<IPC_CREAT> も指定されて"
8396 "いなかった。"
8397
8398 #. type: Plain text
8399 #: build/C/man2/shmget.2:214
8400 msgid "No memory could be allocated for segment overhead."
8401 msgstr "セグメントの管理情報 (overhead) に割り当てるメモリがなかった。"
8402
8403 #. type: Plain text
8404 #: build/C/man2/shmget.2:222
8405 msgid ""
8406 "All possible shared memory IDs have been taken (B<SHMMNI>), or allocating a "
8407 "segment of the requested I<size> would cause the system to exceed the system-"
8408 "wide limit on shared memory (B<SHMALL>)."
8409 msgstr ""
8410 "システム全体の共有メモリ・セグメント数の制限 (B<SHMMNI>)  に達した、または要"
8411 "求された I<size> のセグメントの割り当てが システム全体の共有メモリサイズの制"
8412 "限 (B<SHMALL>)  を超過した。"
8413
8414 #. type: Plain text
8415 #: build/C/man2/shmget.2:229
8416 msgid ""
8417 "The B<SHM_HUGETLB> flag was specified, but the caller was not privileged "
8418 "(did not have the B<CAP_IPC_LOCK> capability)."
8419 msgstr ""
8420 "B<SHM_HUGETLB> フラグが指定されたが、呼び出し元には権限がなかった "
8421 "(B<CAP_IPC_LOCK> ケーパビリティを持っていなかった)。"
8422
8423 #. type: Plain text
8424 #: build/C/man2/shmget.2:235
8425 msgid "B<SHM_HUGETLB> is a nonportable Linux extension."
8426 msgstr "B<SHM_HUGETLB> は Linux での拡張であり、移植性はない。"
8427
8428 #. type: Plain text
8429 #: build/C/man2/shmget.2:245
8430 msgid ""
8431 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special "
8432 "value is used for I<key>, the system call ignores everything but the least "
8433 "significant 9 bits of I<shmflg> and creates a new shared memory segment (on "
8434 "success)."
8435 msgstr ""
8436 "B<IPC_PRIVATE> はフラグではなく I<key_t> 型である。 この特別な値が I<key> に"
8437 "使用された場合は、 B<shmget>()  は I<shmflg> の下位 9 ビットを除いた全てを無"
8438 "視し、 (成功すれば) 新しい共有メモリ・セグメントを作成する。"
8439
8440 #. type: Plain text
8441 #: build/C/man2/shmget.2:249
8442 msgid ""
8443 "The following limits on shared memory segment resources affect the B<shmget>"
8444 "()  call:"
8445 msgstr ""
8446 "B<shmget>()  コールに影響する共有メモリ・セグメント資源の制限は以下の通りであ"
8447 "る:"
8448
8449 #. type: TP
8450 #: build/C/man2/shmget.2:249
8451 #, no-wrap
8452 msgid "B<SHMALL>"
8453 msgstr "B<SHMALL>"
8454
8455 #. type: Plain text
8456 #: build/C/man2/shmget.2:254
8457 msgid ""
8458 "System wide maximum of shared memory pages (on Linux, this limit can be read "
8459 "and modified via I</proc/sys/kernel/shmall>)."
8460 msgstr ""
8461 "システム全体の共有メモリ・ページの最大数 (Linux では、この上限値は I</proc/"
8462 "sys/kernel/shmall> 経由で参照したり、変更したりできる)。"
8463
8464 #. type: TP
8465 #: build/C/man2/shmget.2:254
8466 #, no-wrap
8467 msgid "B<SHMMAX>"
8468 msgstr "B<SHMMAX>"
8469
8470 #. type: Plain text
8471 #: build/C/man2/shmget.2:259
8472 msgid ""
8473 "Maximum size in bytes for a shared memory segment: policy dependent (on "
8474 "Linux, this limit can be read and modified via I</proc/sys/kernel/shmmax>)."
8475 msgstr ""
8476 "共有メモリ・セグメントのバイト単位の大きさの上限: 方針依存 (Linux では、この"
8477 "上限値は I</proc/sys/kernel/shmmax> 経由で参照したり、変更したりできる)。"
8478
8479 #. type: TP
8480 #: build/C/man2/shmget.2:259
8481 #, no-wrap
8482 msgid "B<SHMMIN>"
8483 msgstr "B<SHMMIN>"
8484
8485 #. type: Plain text
8486 #: build/C/man2/shmget.2:265
8487 msgid ""
8488 "Minimum size in bytes for a shared memory segment: implementation dependent "
8489 "(currently 1 byte, though B<PAGE_SIZE> is the effective minimum size)."
8490 msgstr ""
8491 "共有メモリ・セグメントのバイト単位の大きさの下限: 実装依存 (現在は 1 バイトだ"
8492 "が、実質的な最小サイズは B<PAGE_SIZE> である)。"
8493
8494 #. type: TP
8495 #: build/C/man2/shmget.2:265
8496 #, no-wrap
8497 msgid "B<SHMMNI>"
8498 msgstr "B<SHMMNI>"
8499
8500 #.  Kernels between 2.4.x and 2.6.8 had an off-by-one error that meant
8501 #.  that we could create one more segment than SHMMNI -- MTK
8502 #.  This /proc file is not available in Linux 2.2 and earlier -- MTK
8503 #. type: Plain text
8504 #: build/C/man2/shmget.2:274
8505 msgid ""
8506 "System wide maximum number of shared memory segments: implementation "
8507 "dependent (currently 4096, was 128 before Linux 2.3.99; on Linux, this limit "
8508 "can be read and modified via I</proc/sys/kernel/shmmni>)."
8509 msgstr ""
8510 "システム全体の共有メモリーの数の上限: 実装依存 (現在は 4096。Linux 2.3.99 よ"
8511 "り前では 128。 Linux では、この上限値は I</proc/sys/kernel/shmmni> 経由で参照"
8512 "したり、変更したりできる)。"
8513
8514 #. type: Plain text
8515 #: build/C/man2/shmget.2:278
8516 msgid ""
8517 "The implementation has no specific limits for the per-process maximum number "
8518 "of shared memory segments (B<SHMSEG>)."
8519 msgstr ""
8520 "プロセス当りの共有メモリ・セグメントの個数の最大値 (B<SHMSEG>)  に関する実装"
8521 "上の制限はない。"
8522
8523 #. type: Plain text
8524 #: build/C/man2/shmget.2:284
8525 msgid ""
8526 "Until version 2.3.30 Linux would return B<EIDRM> for a B<shmget>()  on a "
8527 "shared memory segment scheduled for deletion."
8528 msgstr ""
8529 "バージョン 2.3.30 までは、Linux は 削除が予定されている共有メモリ・セグメント"
8530 "に対して B<shmget>()  が行われると B<EIDRM> を返していた。"
8531
8532 #. type: Plain text
8533 #: build/C/man2/shmget.2:290
8534 msgid ""
8535 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
8536 "more clearly show its function."
8537 msgstr ""
8538 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
8539 "より明確にその機能を表しているだろう。"
8540
8541 #. type: Plain text
8542 #: build/C/man2/shmget.2:298
8543 msgid ""
8544 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8545 "B<shm_overview>(7), B<svipc>(7)"
8546 msgstr ""
8547 "B<shmat>(2), B<shmctl>(2), B<shmdt>(2), B<ftok>(3), B<capabilities>(7), "
8548 "B<shm_overview>(7), B<svipc>(7)"
8549
8550 #. type: TH
8551 #: build/C/man2/shmop.2:39
8552 #, no-wrap
8553 msgid "SHMOP"
8554 msgstr "SHMOP"
8555
8556 #. type: TH
8557 #: build/C/man2/shmop.2:39
8558 #, no-wrap
8559 msgid "2008-06-03"
8560 msgstr "2008-06-03"
8561
8562 #. type: Plain text
8563 #: build/C/man2/shmop.2:42
8564 msgid "shmat, shmdt - shared memory operations"
8565 msgstr "shmat, shmdt - 共有メモリ (shared memory) の操作"
8566
8567 #. type: Plain text
8568 #: build/C/man2/shmop.2:46
8569 #, no-wrap
8570 msgid ""
8571 "B<#include E<lt>sys/types.hE<gt>>\n"
8572 "B<#include E<lt>sys/shm.hE<gt>>\n"
8573 msgstr ""
8574 "B<#include E<lt>sys/types.hE<gt>>\n"
8575 "B<#include E<lt>sys/shm.hE<gt>>\n"
8576
8577 #. type: Plain text
8578 #: build/C/man2/shmop.2:48
8579 #, no-wrap
8580 msgid "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8581 msgstr "B<void *shmat(int >I<shmid>B<, const void *>I<shmaddr>B<, int >I<shmflg>B<);>\n"
8582
8583 #. type: Plain text
8584 #: build/C/man2/shmop.2:50
8585 #, no-wrap
8586 msgid "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8587 msgstr "B<int shmdt(const void *>I<shmaddr>B<);>\n"
8588
8589 #. type: Plain text
8590 #: build/C/man2/shmop.2:59
8591 msgid ""
8592 "B<shmat>()  attaches the shared memory segment identified by I<shmid> to the "
8593 "address space of the calling process.  The attaching address is specified by "
8594 "I<shmaddr> with one of the following criteria:"
8595 msgstr ""
8596 "B<shmat>()  は I<shmid> で指定された共有メモリ・セグメント (shared memory "
8597 "segment) を コールしたプロセスのアドレス空間に付加 (attach) する。 付加するア"
8598 "ドレスは I<shmaddr> に以下のどれかの形式で指定する:"
8599
8600 #. type: Plain text
8601 #: build/C/man2/shmop.2:65
8602 msgid ""
8603 "If I<shmaddr> is NULL, the system chooses a suitable (unused) address at "
8604 "which to attach the segment."
8605 msgstr ""
8606 "I<shmaddr> が NULL ならば、システムはセグメントを付加するための 適切な (使用"
8607 "されていない) アドレスを選択する。"
8608
8609 #. type: Plain text
8610 #: build/C/man2/shmop.2:80
8611 msgid ""
8612 "If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the "
8613 "attach occurs at the address equal to I<shmaddr> rounded down to the nearest "
8614 "multiple of B<SHMLBA>.  Otherwise I<shmaddr> must be a page-aligned address "
8615 "at which the attach occurs."
8616 msgstr ""
8617 "I<shmaddr> が NULL でなく B<SHM_RND> が I<shmflg> に指定されている場合は、 "
8618 "I<shmaddr> を B<SHMLBA> の倍数へと切り捨てた (rounding down) のと等しいアドレ"
8619 "スへ付加する。 その他の場合は I<shmaddr> は付加を行なうアドレスで、ページ境界"
8620 "を指している必要がある。"
8621
8622 #. type: Plain text
8623 #: build/C/man2/shmop.2:90
8624 msgid ""
8625 "If B<SHM_RDONLY> is specified in I<shmflg>, the segment is attached for "
8626 "reading and the process must have read permission for the segment.  "
8627 "Otherwise the segment is attached for read and write and the process must "
8628 "have read and write permission for the segment.  There is no notion of a "
8629 "write-only shared memory segment."
8630 msgstr ""
8631 "B<SHM_RDONLY> が I<shmflg> に指定されていた場合は、 セグメントは読み込み専用"
8632 "に付加され、プロセスはそのセグメントへの 読み込み許可を持たなければならな"
8633 "い。 そうでなければそのセグメントは読み込みと書き込みのために付加され、 プロ"
8634 "セスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。 書き込み専用"
8635 "の共有メモリ・セグメントという概念は存在しない。"
8636
8637 #. type: Plain text
8638 #: build/C/man2/shmop.2:105
8639 msgid ""
8640 "The (Linux-specific)  B<SHM_REMAP> flag may be specified in I<shmflg> to "
8641 "indicate that the mapping of the segment should replace any existing mapping "
8642 "in the range starting at I<shmaddr> and continuing for the size of the "
8643 "segment.  (Normally an B<EINVAL> error would result if a mapping already "
8644 "exists in this address range.)  In this case, I<shmaddr> must not be NULL."
8645 msgstr ""
8646 "(Linux 特有の)  B<SHM_REMAP> フラグが I<shmflg> に指定された場合は、 セグメン"
8647 "トのマッピングを既存のマッピングに置き換える。 マッピングの範囲は、 "
8648 "I<shmaddr> から始まりセグメントのサイズ分だけある (通常 B<EINVAL> エラーは、"
8649 "このアドレス範囲にマッピングが既に存在するために起る)。 このフラグを指定する"
8650 "場合は、 I<shmaddr> が NULL であってはならない。"
8651
8652 #. type: Plain text
8653 #: build/C/man2/shmop.2:112
8654 msgid ""
8655 "The B<brk>(2)  value of the calling process is not altered by the attach.  "
8656 "The segment will automatically be detached at process exit.  The same "
8657 "segment may be attached as a read and as a read-write one, and more than "
8658 "once, in the process's address space."
8659 msgstr ""
8660 "呼び出したプロセスの B<brk>(2)  の値は付加によって変化しない。 そのセグメント"
8661 "はプロセスが終了 (exit) したら自動的に分離 (detach) される。 同じセグメントを"
8662 "プロセスのアドレス空間に、読み込み専用および読み書き両用 として付加でき、また"
8663 "複数回付加することもできる。"
8664
8665 #. type: Plain text
8666 #: build/C/man2/shmop.2:120
8667 msgid ""
8668 "A successful B<shmat>()  call updates the members of the I<shmid_ds> "
8669 "structure (see B<shmctl>(2))  associated with the shared memory segment as "
8670 "follows:"
8671 msgstr ""
8672 "成功した B<shmat>()  コールは共有メモリ・セグメントに関連する I<shmid_ds> 構"
8673 "造体 (B<shmctl>(2)  を参照) のメンバーを以下のように更新する:"
8674
8675 #. type: Plain text
8676 #: build/C/man2/shmop.2:123
8677 msgid "I<shm_atime> is set to the current time."
8678 msgstr "I<shm_atime> には現在の時刻を設定する。"
8679
8680 #. type: Plain text
8681 #: build/C/man2/shmop.2:126 build/C/man2/shmop.2:152
8682 msgid "I<shm_lpid> is set to the process-ID of the calling process."
8683 msgstr "I<shm_lpid> には呼び出したプロセスのプロセス ID が設定される。"
8684
8685 #. type: Plain text
8686 #: build/C/man2/shmop.2:129
8687 msgid "I<shm_nattch> is incremented by one."
8688 msgstr "I<shm_nattch> を 1 増加させる。"
8689
8690 #. type: Plain text
8691 #: build/C/man2/shmop.2:140
8692 msgid ""
8693 "B<shmdt>()  detaches the shared memory segment located at the address "
8694 "specified by I<shmaddr> from the address space of the calling process.  The "
8695 "to-be-detached segment must be currently attached with I<shmaddr> equal to "
8696 "the value returned by the attaching B<shmat>()  call."
8697 msgstr ""
8698 "B<shmdt>()  は呼び出したプロセスのアドレス空間から I<shmaddr> で指定されたア"
8699 "ドレスに配置された共有メモリ・セグメントを分離 (detach) する。 分離する共有メ"
8700 "モリ・セグメントは、現在 I<shmaddr> に付加されているものでなければならない。 "
8701 "I<shmaddr> は、それを付加した時に B<shmat>()  が返した値に等しくなければなら"
8702 "ない。"
8703
8704 #. type: Plain text
8705 #: build/C/man2/shmop.2:146
8706 msgid ""
8707 "On a successful B<shmdt>()  call the system updates the members of the "
8708 "I<shmid_ds> structure associated with the shared memory segment as follows:"
8709 msgstr ""
8710 "成功した B<shmdt>()  コールはその共有メモリ・セグメントに関連する "
8711 "I<shmid_ds> 構造体のメンバーを以下のように更新する:"
8712
8713 #. type: Plain text
8714 #: build/C/man2/shmop.2:149
8715 msgid "I<shm_dtime> is set to the current time."
8716 msgstr "I<shm_dtime> には現在の時刻が設定される。"
8717
8718 #. type: Plain text
8719 #: build/C/man2/shmop.2:157
8720 msgid ""
8721 "I<shm_nattch> is decremented by one.  If it becomes 0 and the segment is "
8722 "marked for deletion, the segment is deleted."
8723 msgstr ""
8724 "I<shm_nattch> を 1 減少させる。 もし 0 になり、削除マークがあった場合は その"
8725 "セグメントは削除される。"
8726
8727 #. type: Plain text
8728 #: build/C/man2/shmop.2:161
8729 msgid ""
8730 "After a B<fork>(2)  the child inherits the attached shared memory segments."
8731 msgstr ""
8732 "B<fork>(2)  した後、子プロセスは付加された共有メモリ・セグメントを継承する。"
8733
8734 #. type: Plain text
8735 #: build/C/man2/shmop.2:165
8736 msgid ""
8737 "After an B<execve>(2)  all attached shared memory segments are detached from "
8738 "the process."
8739 msgstr ""
8740 "B<exec>(2)  した後、全ての付加された共有メモリ・セグメントはプロセスから分離"
8741 "される。"
8742
8743 #. type: Plain text
8744 #: build/C/man2/shmop.2:169
8745 msgid ""
8746 "Upon B<_exit>(2)  all attached shared memory segments are detached from the "
8747 "process."
8748 msgstr ""
8749 "B<exit>(2)  において、全ての付加された共有メモリ・セグメントはプロセスから分"
8750 "離される。"
8751
8752 #. type: Plain text
8753 #: build/C/man2/shmop.2:177
8754 msgid ""
8755 "On success B<shmat>()  returns the address of the attached shared memory "
8756 "segment; on error I<(void\\ *)\\ -1> is returned, and I<errno> is set to "
8757 "indicate the cause of the error."
8758 msgstr ""
8759 "B<shmat>()  は、成功した場合、 付加された共有メモリ・セグメントのアドレスを返"
8760 "す。 エラーの場合、 I<(void\\ *)\\ -1> を返し、 I<errno> にエラーの原因を示す"
8761 "値を設定する。"
8762
8763 #. type: Plain text
8764 #: build/C/man2/shmop.2:183
8765 msgid ""
8766 "On success B<shmdt>()  returns 0; on error -1 is returned, and I<errno> is "
8767 "set to indicate the cause of the error."
8768 msgstr ""
8769 "B<shmdt>()  は、成功すると 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエ"
8770 "ラーの原因を示す値を設定する。"
8771
8772 #. type: Plain text
8773 #: build/C/man2/shmop.2:189
8774 msgid "When B<shmat>()  fails, I<errno> is set to one of the following:"
8775 msgstr ""
8776 "B<shmat>()  が失敗した場合、 I<errno> に以下の値のどれかを設定して返す:"
8777
8778 #. type: Plain text
8779 #: build/C/man2/shmop.2:195
8780 msgid ""
8781 "The calling process does not have the required permissions for the requested "
8782 "attach type, and does not have the B<CAP_IPC_OWNER> capability."
8783 msgstr ""
8784 "呼び出したプロセスに要求された種類の付加に必要な許可がなく、 "
8785 "B<CAP_IPC_OWNER> ケーパビリティ (capability) がない。"
8786
8787 #. type: Plain text
8788 #: build/C/man2/shmop.2:209
8789 msgid ""
8790 "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was "
8791 "not specified) or invalid I<shmaddr> value, or can't attach segment at "
8792 "I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL."
8793 msgstr ""
8794 "I<shmid> の値が不正である。 I<shmaddr> の値が境界違反 (unaligned) (つまり、"
8795 "ページ境界に合っておらず、 B<SHM_RND> が指定されていない) または が不正であ"
8796 "る。 I<shmaddr> へのセグメントの付加に失敗した。 または B<SHM_REMAP> が指定さ"
8797 "れているが、 I<shmaddr> が NULL であった。"
8798
8799 #. type: Plain text
8800 #: build/C/man2/shmop.2:212
8801 msgid "Could not allocate memory for the descriptor or for the page tables."
8802 msgstr ""
8803 "ディスクリプター (descriptor) やページ・テーブルのためのメモリを 割り当てるこ"
8804 "とができない。"
8805
8806 #. type: Plain text
8807 #: build/C/man2/shmop.2:218
8808 msgid "When B<shmdt>()  fails, I<errno> is set as follows:"
8809 msgstr "B<shmdt>()  が失敗した場合、 B<EINVAL> は以下のようにセットされる:"
8810
8811 #.  The following since 2.6.17-rc1:
8812 #. type: Plain text
8813 #: build/C/man2/shmop.2:226
8814 msgid ""
8815 "There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is "
8816 "not aligned on a page boundary."
8817 msgstr ""
8818 "I<shmaddr> に付加された共有メモリ・セグメントが存在しない。 もしくは、 "
8819 "I<shmaddr> がページ境界に合っていない。"
8820
8821 #. type: Plain text
8822 #: build/C/man2/shmop.2:245
8823 msgid ""
8824 "In SVID 3 (or perhaps earlier)  the type of the I<shmaddr> argument was "
8825 "changed from I<char *> into I<const void *>, and the returned type of "
8826 "B<shmat>()  from I<char *> into I<void *>.  (Linux libc4 and libc5 have the "
8827 "I<char *> prototypes; glibc2 has I<void *>.)"
8828 msgstr ""
8829 "SVID 3 で (たぶんそれより前だと思うが)  I<shmaddr> 引き数の型は I<char *> か"
8830 "ら I<const void *> に、I<shmat>() の返り値の型は I<char *> から I<void *> に"
8831 "変更された (Linux では libc4 と libc5 のプロトタイプは I<char *> であり、"
8832 "glibc2 のプロトタイプは I<void *> である)。"
8833
8834 #. type: Plain text
8835 #: build/C/man2/shmop.2:257
8836 msgid ""
8837 "Using B<shmat>()  with I<shmaddr> equal to NULL is the preferred, portable "
8838 "way of attaching a shared memory segment.  Be aware that the shared memory "
8839 "segment attached in this way may be attached at different addresses in "
8840 "different processes.  Therefore, any pointers maintained within the shared "
8841 "memory must be made relative (typically to the starting address of the "
8842 "segment), rather than absolute."
8843 msgstr ""
8844 "共有メモリセグメントを付加する場合の移植性の高い方法としては、 I<shmaddr> を "
8845 "NULL にして B<shmat>()  を使用するのがよい。 このような方法で付加される共有メ"
8846 "モリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意"
8847 "すること。 よって共有メモリ内で管理されるポインタは、 絶対アドレスではなく、 "
8848 "(一般的にはセグメントの開始アドレスからの)  相対アドレスで作成するべきであ"
8849 "る。"
8850
8851 #. type: Plain text
8852 #: build/C/man2/shmop.2:262
8853 msgid ""
8854 "On Linux, it is possible to attach a shared memory segment even if it is "
8855 "already marked to be deleted.  However, POSIX.1-2001 does not specify this "
8856 "behavior and many other implementations do not support it."
8857 msgstr ""
8858 "Linux では共有メモリセグメントに既に削除マークが付けられていても、 その共有メ"
8859 "モリセグメントを付加することができる。 しかし POSIX.1-2001 ではこのような動作"
8860 "を指定しておらず、 他の多くの実装もこれをサポートしていない。"
8861
8862 #. type: Plain text
8863 #: build/C/man2/shmop.2:265
8864 msgid "The following system parameter affects B<shmat>():"
8865 msgstr "以下のシステム・パラメーターは、 B<shmat>()  に影響する:"
8866
8867 #.  FIXME A good explanation of the rationale for the existence
8868 #.  of SHMLBA would be useful here
8869 #. type: TP
8870 #: build/C/man2/shmop.2:265
8871 #, no-wrap
8872 msgid "B<SHMLBA>"
8873 msgstr "B<SHMLBA>"
8874
8875 #.  FIXME That last sentence isn't true for all Linux
8876 #.  architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
8877 #.  -- MTK, Nov 04
8878 #. type: Plain text
8879 #: build/C/man2/shmop.2:278
8880 msgid ""
8881 "Segment low boundary address multiple.  Must be page aligned.  For the "
8882 "current implementation the B<SHMLBA> value is B<PAGE_SIZE>."
8883 msgstr ""
8884 "セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。 現在"
8885 "の実装では B<SHMLBA> の値は B<PAGE_SIZE> である。"
8886
8887 #. type: Plain text
8888 #: build/C/man2/shmop.2:282
8889 msgid ""
8890 "The implementation places no intrinsic limit on the per-process maximum "
8891 "number of shared memory segments (B<SHMSEG>)."
8892 msgstr ""
8893 "現在の実装では、プロセスごとの 共有メモリ・セグメントの最大数 (B<SHMSEG>)  に"
8894 "関する実装依存の制限はない。"
8895
8896 #. type: Plain text
8897 #: build/C/man2/shmop.2:290
8898 msgid ""
8899 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8900 "B<shm_overview>(7), B<svipc>(7)"
8901 msgstr ""
8902 "B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), "
8903 "B<shm_overview>(7), B<svipc>(7)"
8904
8905 #. type: TH
8906 #: build/C/man2/subpage_prot.2:28
8907 #, no-wrap
8908 msgid "SUBPAGE_PROT"
8909 msgstr "SUBPAGE_PROT"
8910
8911 #. type: TH
8912 #: build/C/man2/subpage_prot.2:28
8913 #, no-wrap
8914 msgid "2010-10-30"
8915 msgstr "2010-10-30"
8916
8917 #. type: Plain text
8918 #: build/C/man2/subpage_prot.2:31
8919 msgid "subpage_prot - define a subpage protection for an address range"
8920 msgstr ""
8921
8922 #. type: Plain text
8923 #: build/C/man2/subpage_prot.2:35
8924 #, no-wrap
8925 msgid ""
8926 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8927 "B<                  uint32_t *>I<map>B<);>\n"
8928 msgstr ""
8929 "B<long subpage_prot(unsigned long >I<addr>B<, unsigned long >I<len>B<,>\n"
8930 "B<                  uint32_t *>I<map>B<);>\n"
8931
8932 #. type: Plain text
8933 #: build/C/man2/subpage_prot.2:42
8934 msgid ""
8935 "The PowerPC-specific B<subpage_prot>()  system call provides the facility to "
8936 "control the access permissions on individual 4kB subpages on systems "
8937 "configured with a page size of 64kB."
8938 msgstr ""
8939
8940 #. type: Plain text
8941 #: build/C/man2/subpage_prot.2:49
8942 msgid ""
8943 "The protection map is applied to the memory pages in the region starting at "
8944 "I<addr> and continuing for I<len> bytes.  Both of these arguments must be "
8945 "aligned to a 64-kB boundary."
8946 msgstr ""
8947
8948 #. type: Plain text
8949 #: build/C/man2/subpage_prot.2:61
8950 msgid ""
8951 "The protection map is specified in the buffer pointed to by I<map>.  The map "
8952 "has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections "
8953 "of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words "
8954 "pointed to by I<map> should equate to the number of 64-kB pages specified by "
8955 "I<len>).  Each 2-bit field in the protection map is either 0 to allow any "
8956 "access, 1 to prevent writes, or 2 or 3 to prevent all accesses."
8957 msgstr ""
8958
8959 #. type: Plain text
8960 #: build/C/man2/subpage_prot.2:66
8961 msgid ""
8962 "On success, B<subpage_prot>()  returns 0.  Otherwise, one of the error codes "
8963 "specified below is returned."
8964 msgstr ""
8965
8966 #. type: Plain text
8967 #: build/C/man2/subpage_prot.2:72
8968 msgid "The buffer referred to by I<map> is not accessible."
8969 msgstr ""
8970
8971 #. type: Plain text
8972 #: build/C/man2/subpage_prot.2:82
8973 msgid ""
8974 "The I<addr> or I<len> arguments are incorrect.  Both of these arguments must "
8975 "be aligned to a multiple of the system page size, and they must not refer to "
8976 "a region outside of the address space of the process or to a region that "
8977 "consists of huge pages."
8978 msgstr ""
8979
8980 #. type: Plain text
8981 #: build/C/man2/subpage_prot.2:85 build/C/man2/sync_file_range.2:166
8982 msgid "Out of memory."
8983 msgstr "メモリ不足である。"
8984
8985 #. type: Plain text
8986 #: build/C/man2/subpage_prot.2:91
8987 msgid ""
8988 "This system call is provided on the PowerPC architecture since Linux "
8989 "2.6.25.  The system call is provided only if the kernel is configured with "
8990 "B<CONFIG_PPC_64K_PAGES>.  No library support is provided."
8991 msgstr ""
8992
8993 #. type: Plain text
8994 #: build/C/man2/subpage_prot.2:98
8995 msgid ""
8996 "Normal page protections (at the 64-kB page level) also apply; the subpage "
8997 "protection mechanism is an additional constraint, so putting 0 in a 2-bit "
8998 "field won't allow writes to a page that is otherwise write-protected."
8999 msgstr ""
9000
9001 #. type: SS
9002 #: build/C/man2/subpage_prot.2:98
9003 #, no-wrap
9004 msgid "Rationale"
9005 msgstr ""
9006
9007 #.  In the initial implementation, it was the case that:
9008 #.      In fact the whole process is switched to use 4k hardware pages when the
9009 #.      subpage_prot system call is used, but this could be improved in future
9010 #.      to switch only the affected segments.
9011 #.  But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch
9012 #.  the affected segment, not the whole process.
9013 #. type: Plain text
9014 #: build/C/man2/subpage_prot.2:120
9015 msgid ""
9016 "This system call is provided to assist writing emulators that operate using "
9017 "64-kB pages on PowerPC systems.  When emulating systems such as x86, which "
9018 "uses a smaller page size, the emulator can no longer use the memory-"
9019 "management unit (MMU)  and normal system calls for controlling page "
9020 "protections.  (The emulator could emulate the MMU by checking and possibly "
9021 "remapping the address for each memory access in software, but that is "
9022 "slow.)  The idea is that the emulator supplies an array of protection masks "
9023 "to apply to a specified range of virtual addresses.  These masks are applied "
9024 "at the level where hardware page-table entries (PTEs)  are inserted into the "
9025 "hardware page table based on the Linux PTEs, so the Linux PTEs are not "
9026 "affected.  Implicit in this is that the regions of the address space that "
9027 "are protected are switched to use 4-kB hardware pages rather than 64-kB "
9028 "hardware pages (on machines with hardware 64-kB page support)."
9029 msgstr ""
9030
9031 #. type: Plain text
9032 #: build/C/man2/subpage_prot.2:123
9033 msgid "B<mprotect>(2), B<syscall>(2);"
9034 msgstr ""
9035
9036 #. type: Plain text
9037 #: build/C/man2/subpage_prot.2:126
9038 msgid "the kernel source file I<Documentation/vm/hugetlbpage.txt>."
9039 msgstr ""
9040
9041 #. type: TH
9042 #: build/C/man2/sync_file_range.2:30
9043 #, no-wrap
9044 msgid "SYNC_FILE_RANGE"
9045 msgstr "SYNC_FILE_RANGE"
9046
9047 #. type: Plain text
9048 #: build/C/man2/sync_file_range.2:33
9049 msgid "sync_file_range - sync a file segment with disk"
9050 msgstr "sync_file_range - ファイルセグメントをディスクと同期する"
9051
9052 #. type: Plain text
9053 #: build/C/man2/sync_file_range.2:37
9054 #, no-wrap
9055 msgid ""
9056 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
9057 "B<#include E<lt>fcntl.hE<gt>>\n"
9058 msgstr ""
9059 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
9060 "B<#include E<lt>fcntl.hE<gt>>\n"
9061
9062 #. type: Plain text
9063 #: build/C/man2/sync_file_range.2:40
9064 #, no-wrap
9065 msgid ""
9066 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
9067 "B<                    unsigned int >I<flags>B<);>\n"
9068 msgstr ""
9069 "B<int sync_file_range(int >I<fd>B<, off64_t >I<offset>B<, off64_t >I<nbytes>B<,>\n"
9070 "B<                    unsigned int >I<flags>B<);>\n"
9071
9072 #. type: Plain text
9073 #: build/C/man2/sync_file_range.2:47
9074 msgid ""
9075 "B<sync_file_range>()  permits fine control when synchronizing the open file "
9076 "referred to by the file descriptor I<fd> with disk."
9077 msgstr ""
9078 "B<sync_file_range>()  を使うと、ファイルディスクリプタ I<fd> で参照されるオー"
9079 "プンされたファイルのディスクとの同期に関して、 きめ細かな制御が可能となる。"
9080
9081 #. type: Plain text
9082 #: build/C/man2/sync_file_range.2:61
9083 msgid ""
9084 "I<offset> is the starting byte of the file range to be synchronized.  "
9085 "I<nbytes> specifies the length of the range to be synchronized, in bytes; if "
9086 "I<nbytes> is zero, then all bytes from I<offset> through to the end of file "
9087 "are synchronized.  Synchronization is in units of the system page size: "
9088 "I<offset> is rounded down to a page boundary; I<(offset+nbytes-1)> is "
9089 "rounded up to a page boundary."
9090 msgstr ""
9091 "I<offset> は、同期を行うファイルの領域の開始バイトである。 I<nbytes> には同期"
9092 "を行う領域の長さをバイト単位で指定する。 I<nbytes> が 0 の場合は、 I<offset> "
9093 "からファイル末尾までの全バイトを同期する。 同期はシステムのページサイズの単位"
9094 "で行われる。 I<offset> はページ境界にあわせて切り下げられ、 I<(offset"
9095 "+nbytes-1)> はページ境界にあわせて切り上げられる。"
9096
9097 #. type: Plain text
9098 #: build/C/man2/sync_file_range.2:65
9099 msgid "The I<flags> bit-mask argument can include any of the following values:"
9100 msgstr "ビットマスク引き数 I<flags> には以下の値を指定することができる:"
9101
9102 #. type: TP
9103 #: build/C/man2/sync_file_range.2:65
9104 #, no-wrap
9105 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
9106 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE>"
9107
9108 #. type: Plain text
9109 #: build/C/man2/sync_file_range.2:70
9110 msgid ""
9111 "Wait upon write-out of all pages in the specified range that have already "
9112 "been submitted to the device driver for write-out before performing any "
9113 "write."
9114 msgstr ""
9115 "何らかの書き込みを行う前に、指定された領域のページで 書き出しを行うようにデバ"
9116 "イスドライバにすでに要求が発行されている ページの書き出しが全て完了するのを待"
9117 "つ。"
9118
9119 #. type: TP
9120 #: build/C/man2/sync_file_range.2:70 build/C/man2/sync_file_range.2:120
9121 #, no-wrap
9122 msgid "B<SYNC_FILE_RANGE_WRITE>"
9123 msgstr "B<SYNC_FILE_RANGE_WRITE>"
9124
9125 #. type: Plain text
9126 #: build/C/man2/sync_file_range.2:76
9127 msgid ""
9128 "Initiate write-out of all dirty pages in the specified range which are not "
9129 "presently submitted write-out.  Note that even this may block if you attempt "
9130 "to write more than request queue size."
9131 msgstr ""
9132 "指定された領域のページで、書き出し要求が発行されていない 全ての dirty (キャッ"
9133 "シュだけが変更されている) ページの 書き出しを開始する。 リクエストキューの大"
9134 "きさより多く書き込もうとした場合には、 この処理は停止 (block) する可能性があ"
9135 "る点に注意すること。"
9136
9137 #. type: TP
9138 #: build/C/man2/sync_file_range.2:76
9139 #, no-wrap
9140 msgid "B<SYNC_FILE_RANGE_WAIT_AFTER>"
9141 msgstr "B<SYNC_FILE_RANGE_WAIT_AFTER>"
9142
9143 #. type: Plain text
9144 #: build/C/man2/sync_file_range.2:80
9145 msgid ""
9146 "Wait upon write-out of all pages in the range after performing any write."
9147 msgstr ""
9148 "何らかの書き込み後に、指定された領域の全てのページの 書き出しが行われるのを待"
9149 "つ。"
9150
9151 #. type: Plain text
9152 #: build/C/man2/sync_file_range.2:84
9153 msgid "Specifying I<flags> as 0 is permitted, as a no-op."
9154 msgstr "I<flags> に 0 を指定した場合、何もしないことを表す。"
9155
9156 #. type: SS
9157 #: build/C/man2/sync_file_range.2:84
9158 #, no-wrap
9159 msgid "Warning"
9160 msgstr "警告"
9161
9162 #. type: Plain text
9163 #: build/C/man2/sync_file_range.2:100
9164 msgid ""
9165 "This system call is extremely dangerous and should not be used in portable "
9166 "programs.  None of these operations writes out the file's metadata.  "
9167 "Therefore, unless the application is strictly performing overwrites of "
9168 "already-instantiated disk blocks, there are no guarantees that the data will "
9169 "be available after a crash.  There is no user interface to know if a write "
9170 "is purely an overwrite.  On file systems using copy-on-write semantics (e."
9171 "g., I<btrfs>)  an overwrite of existing allocated blocks is impossible.  "
9172 "When writing into preallocated space, many file systems also require calls "
9173 "into the block allocator, which this system call does not sync out to disk.  "
9174 "This system call does not flush disk write caches and thus does not provide "
9175 "any data integrity on systems with volatile disk write caches."
9176 msgstr ""
9177 "このシステムコールは非常に危険であり、 移植性が必要なプログラムで使用すべきで"
9178 "はない。 これらの操作ではどれもファイルのメタデータの書き出しを行わない。 し"
9179 "たがって、アプリケーションにより作成済みのディスクブロックの 上書きの実行が確"
9180 "実に行われない限り、クラッシュの後でもデータが 利用できる保証はない。 書き込"
9181 "みが上書きだけであるかを知るためのユーザインタフェースは存在しない。 "
9182 "(I<btrfs> などの) copy-on-write 動作を使ったファイルシステムでは、 既存の割り"
9183 "当て済みのブロックに対する上書き自体ができない。 前もって割り当てられた領域に"
9184 "書き込みを行う場合、 多くのファイルシステムでは block allocator への書き込み"
9185 "も必要となるが、 このシステムコールは block allocator のディスクへの同期を行"
9186 "わない。 このシステムコールはディスク書き込みキャッシュのフラッシュを 行わな"
9187 "いので、揮発性のディスク書き込みキャッシュを使ったシステムでは このシステム"
9188 "コールではデータの一貫性を確保できないことになる。"
9189
9190 #. type: SS
9191 #: build/C/man2/sync_file_range.2:100
9192 #, no-wrap
9193 msgid "Some details"
9194 msgstr "詳細"
9195
9196 #. type: Plain text
9197 #: build/C/man2/sync_file_range.2:108
9198 msgid ""
9199 "B<SYNC_FILE_RANGE_WAIT_BEFORE> and B<SYNC_FILE_RANGE_WAIT_AFTER> will detect "
9200 "any I/O errors or B<ENOSPC> conditions and will return these to the caller."
9201 msgstr ""
9202 "B<SYNC_FILE_RANGE_WAIT_BEFORE> と B<SYNC_FILE_RANGE_WAIT_AFTER> は I/O エラー"
9203 "や B<ENOSPC> 状態を検出し、呼び出し元にこれらの情報を返す。"
9204
9205 #. type: Plain text
9206 #: build/C/man2/sync_file_range.2:112
9207 msgid "Useful combinations of the I<flags> bits are:"
9208 msgstr "I<flags> の役に立つビットの組み合わせを以下に示す:"
9209
9210 #. type: TP
9211 #: build/C/man2/sync_file_range.2:112
9212 #, no-wrap
9213 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
9214 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE>"
9215
9216 #. type: Plain text
9217 #: build/C/man2/sync_file_range.2:120
9218 msgid ""
9219 "Ensures that all pages in the specified range which were dirty when "
9220 "B<sync_file_range>()  was called are placed under write-out.  This is a "
9221 "start-write-for-data-integrity operation."
9222 msgstr ""
9223 "指定された範囲内のページで、 B<sync_file_range>()  が呼び出された際に dirty "
9224 "であった全てのページが、 確実に書き出し対象となるようにする。 これは、start-"
9225 "write-for-data-integrity 操作 (データ完全性確保のための書き込み開始の操作) で"
9226 "ある。"
9227
9228 #. type: Plain text
9229 #: build/C/man2/sync_file_range.2:127
9230 msgid ""
9231 "Start write-out of all dirty pages in the specified range which are not "
9232 "presently under write-out.  This is an asynchronous flush-to-disk "
9233 "operation.  This is not suitable for data integrity operations."
9234 msgstr ""
9235 "指定された範囲内のページで、現在書き出し中でない全ての dirty ページの 書き出"
9236 "しを開始する。これは非同期のディスクへのフラッシュ (flush-to-disk)  操作であ"
9237 "る。データ完全性確保が必要な操作としては適切ではない。"
9238
9239 #. type: TP
9240 #: build/C/man2/sync_file_range.2:127
9241 #, no-wrap
9242 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
9243 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE> (or B<SYNC_FILE_RANGE_WAIT_AFTER>)"
9244
9245 #. type: Plain text
9246 #: build/C/man2/sync_file_range.2:134
9247 msgid ""
9248 "Wait for completion of write-out of all pages in the specified range.  This "
9249 "can be used after an earlier B<SYNC_FILE_RANGE_WAIT_BEFORE | "
9250 "SYNC_FILE_RANGE_WRITE> operation to wait for completion of that operation, "
9251 "and obtain its result."
9252 msgstr ""
9253 "指定された範囲内の全てのページの書き出しの完了を待つ。 このフラグは、前に行わ"
9254 "れた操作 B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE> の後に使用で"
9255 "き、この操作の完了を待ち、結果を取得することができる。"
9256
9257 #. type: TP
9258 #: build/C/man2/sync_file_range.2:134
9259 #, no-wrap
9260 msgid "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
9261 msgstr "B<SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WAIT_AFTER>"
9262
9263 #. type: Plain text
9264 #: build/C/man2/sync_file_range.2:141
9265 msgid ""
9266 "This is a write-for-data-integrity operation that will ensure that all pages "
9267 "in the specified range which were dirty when B<sync_file_range>()  was "
9268 "called are committed to disk."
9269 msgstr ""
9270 "これは write-for-data-integrity 操作 (データ完全性確保のための書き込み) であ"
9271 "り、指定された範囲内の、 B<sync_file_range>()  が呼ばれた時点で dirty な全て"
9272 "のページが ディスクに格納されることが保証される。"
9273
9274 #. type: Plain text
9275 #: build/C/man2/sync_file_range.2:147
9276 msgid ""
9277 "On success, B<sync_file_range>()  returns 0; on failure -1 is returned and "
9278 "I<errno> is set to indicate the error."
9279 msgstr ""
9280 "成功の場合、 B<sync_file_range>()  は 0 を返す。失敗の場合、-1 を返し、 "
9281 "I<error> にエラーを示す値を設定する。"
9282
9283 #. type: Plain text
9284 #: build/C/man2/sync_file_range.2:152
9285 msgid "I<fd> is not a valid file descriptor."
9286 msgstr "I<fd> が有効なファイルディスクリプタではない。"
9287
9288 #. type: Plain text
9289 #: build/C/man2/sync_file_range.2:160
9290 msgid ""
9291 "I<flags> specifies an invalid bit; or I<offset> or I<nbytes> is invalid."
9292 msgstr ""
9293 "I<flags> に不正なビットが指定されている。または I<offset> か I<nbytes> が不正"
9294 "である。"
9295
9296 #. type: Plain text
9297 #: build/C/man2/sync_file_range.2:163
9298 msgid "I/O error."
9299 msgstr "I/O エラー。"
9300
9301 #. type: Plain text
9302 #: build/C/man2/sync_file_range.2:169
9303 msgid "Out of disk space."
9304 msgstr "ディスク領域不足である。"
9305
9306 #.  FIXME . (bug?) Actually, how can 'fd' refer to a symbolic link (S_ISLNK)?
9307 #.  (In userspace at least) it isn't possible to obtain a file descriptor
9308 #.  for a symbolic link.
9309 #. type: Plain text
9310 #: build/C/man2/sync_file_range.2:177
9311 msgid ""
9312 "I<fd> refers to something other than a regular file, a block device, a "
9313 "directory, or a symbolic link."
9314 msgstr ""
9315 "I<fd> が、通常のファイル、ブロックデバイス、ディレクトリ、シンボリックリンク "
9316 "以外のものを指している。"
9317
9318 #. type: Plain text
9319 #: build/C/man2/sync_file_range.2:180
9320 msgid "B<sync_file_range>()  appeared on Linux in kernel 2.6.17."
9321 msgstr "B<sync_file_range>()  はカーネル 2.6.17 で Linux に登場した。"
9322
9323 #. type: Plain text
9324 #: build/C/man2/sync_file_range.2:183
9325 msgid ""
9326 "This system call is Linux-specific, and should be avoided in portable "
9327 "programs."
9328 msgstr ""
9329 "このシステムコールは Linux 独自であり、 移植性が必要なプログラムでは使用を避"
9330 "けるべきである。"
9331
9332 #.  See kernel commit edd5cd4a9424f22b0fa08bef5e299d41befd5622
9333 #. type: Plain text
9334 #: build/C/man2/sync_file_range.2:196
9335 msgid ""
9336 "Some architectures (e.g., PowerPC, ARM)  need 64-bit arguments to be aligned "
9337 "in a suitable pair of registers.  On such architectures, the call signature "
9338 "of B<sync_file_range>()  is flawed, since it forces a register to be wasted "
9339 "as padding between the I<fd> and I<offset> arguments.  Therefore, these "
9340 "architectures define a different system call that orders the arguments "
9341 "suitably:"
9342 msgstr ""
9343
9344 #. type: Plain text
9345 #: build/C/man2/sync_file_range.2:201
9346 #, no-wrap
9347 msgid ""
9348 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
9349 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
9350 msgstr ""
9351 "B<int sync_file_range2(int >I<fd>B<, unsigned int >I<flags>B<,>\n"
9352 "B<                     off64_t >I<offset>B<, off64_t >I<nbytes>B<);>\n"
9353
9354 #. type: Plain text
9355 #: build/C/man2/sync_file_range.2:206
9356 msgid ""
9357 "The behavior of this system call is otherwise exactly the same as "
9358 "B<sync_file_range>()."
9359 msgstr ""
9360
9361 #. type: Plain text
9362 #: build/C/man2/sync_file_range.2:217
9363 msgid ""
9364 "A system call with this signature first appeared on the ARM architecture in "
9365 "Linux 2.6.20, with the name B<arm_sync_file_range>().  It was renamed in "
9366 "Linux 2.6.22, when the analogous system call was added for PowerPC.  On "
9367 "architectures where glibc support is provided, glibc transparently wraps "
9368 "B<sync_file_range2>()  under the name B<sync_file_range>()."
9369 msgstr ""
9370
9371 #. type: Plain text
9372 #: build/C/man2/sync_file_range.2:222
9373 msgid "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
9374 msgstr "B<fdatasync>(2), B<fsync>(2), B<msync>(2), B<sync>(2)"
9375
9376 #~ msgid ""
9377 #~ "The I<mode> is not supported by the file system containing the file "
9378 #~ "referred to by I<fd>."
9379 #~ msgstr ""
9380 #~ "I<fd> が参照するファイルを含むファイルシステムが I<mode> をサポートしてい"
9381 #~ "ない。"
9382
9383 #~ msgid ""
9384 #~ "The function B<mtrace>()  installs handlers for B<malloc>(3), B<realloc>"
9385 #~ "(3)  and B<free>(3).  The function B<muntrace>()  disables these handlers."
9386 #~ msgstr ""
9387 #~ "関数 B<mtrace>()  は、 B<malloc>(3), B<realloc>(3), B<free>(3)  のハンドラ"
9388 #~ "を組み込む。 関数 B<muntrace>()  はこれらのハンドラを解除する。"
9389
9390 #~ msgid ""
9391 #~ "The environment variable B<MALLOC_TRACE> defines a file where B<mtrace>"
9392 #~ "()  writes its output.  This file must be writable to the user or "
9393 #~ "B<mtrace>()  will do nothing.  If the file is not empty it will be "
9394 #~ "truncated."
9395 #~ msgstr ""
9396 #~ "環境変数 B<MALLOC_TRACE> は B<mtrace>()  が出力を書き出すファイルを指定す"
9397 #~ "る。 ユーザが書き込み権限を持つファイルを指定しなければならない。 書き込み"
9398 #~ "権限がない場合、 B<mtrace>()  は何もしない。 ファイルが空でない場合、ファ"
9399 #~ "イルの元の内容を上書きする。"
9400
9401 #~ msgid "These are GNU extensions."
9402 #~ msgstr "この関数は GNU 拡張である。"
9403
9404 #~ msgid ""
9405 #~ "The output of B<mtrace>()  will be ASCII but not in a friendly format.  "
9406 #~ "So glibc comes with a perl-script called mtrace to make sense of it."
9407 #~ msgstr ""
9408 #~ "B<mtrace>()  の出力は ASCII 形式だが、人が読みやすいフォーマットではな"
9409 #~ "い。 そこで、glibc には mtrace 出力を分かりやすい形式に変換する perl スク"
9410 #~ "リプトが付属している。"
9411
9412 #~ msgid ""
9413 #~ "This flag allocates and initializes to zero the disk space within the "
9414 #~ "range specified by I<offset> and I<len>.  After a successful call, "
9415 #~ "subsequent writes into this range are guaranteed not to fail because of "
9416 #~ "lack of disk space.  Preallocating zeroed blocks beyond the end of the "
9417 #~ "file is useful for optimizing append workloads.  Preallocating blocks "
9418 #~ "does not change the file size (as reported by B<stat>(2))  even if it is "
9419 #~ "less than I<offset>+I<len>."
9420 #~ msgstr ""
9421 #~ "このフラグは、 I<offset> と I<len> で指定された領域のディスク空間を割り当"
9422 #~ "て、その空間を 0 で初期化する。 呼び出しが成功すると、それに続いてこの領域"
9423 #~ "への書き込みが行われるが、 ディスク空間の不足による書き込み失敗が発生しな"
9424 #~ "いことが保証される。 ファイル末尾より後ろの領域について 0 で埋めたブロック"
9425 #~ "を前もって 割り当てておくことは、追記 (append) の作業負荷を最適化するのに "
9426 #~ "有用である。 ファイルサイズが I<offset>+I<len> よりも小さい場合であって"
9427 #~ "も、ブロックの前もっての割り当てにより (B<stat>(2)  が返す) ファイルサイズ"
9428 #~ "は変更されることはない。"
9429
9430 #~ msgid ""
9431 #~ "(Linux 2.6.9 and later) the caller was not privileged (B<CAP_IPC_LOCK>)  "
9432 #~ "and its B<RLIMIT_MEMLOCK> soft resource limit was 0."
9433 #~ msgstr ""
9434 #~ "(Linux 2.6.9 以降) 呼び出し元は特権 (B<CAP_IPC_LOCK>)  を持たず、ソフト資"
9435 #~ "源制限 B<RLIMIT_MEMLOCK> が 0 である。"
9436
9437 #~ msgid ""
9438 #~ "(Linux 2.6.8 and earlier)  The calling process has insufficient privilege "
9439 #~ "to call B<munlockall>().  Under Linux the B<CAP_IPC_LOCK> capability is "
9440 #~ "required."
9441 #~ msgstr ""
9442 #~ "(Linux 2.6.8 以前)  呼び出し元プロセスが B<munlockall>()  を呼び出すのに必"
9443 #~ "要な特権を所有していなかった。 Linux では、 B<CAP_IPC_LOCK> ケーパビリティ"
9444 #~ "が必要である。"
9445
9446 #~ msgid ""
9447 #~ "B<posix_fadvise>()  appeared in kernel 2.5.60.  Glibc support has been "
9448 #~ "provided since version 2.2."
9449 #~ msgstr ""
9450 #~ "B<posix_fadvise>()  はカーネル 2.5.60 で登場した。 glibc でのサポートは "
9451 #~ "glibc バージョン 2.2 以降で行われている。"