OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / madvise.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 2001 David Gez <davidge@jazzfree.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Based on comments from mm/filemap.c. Last modified on 10-06-2001
26 .\" Modified, 25 Feb 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
27 .\"    Added notes on MADV_DONTNEED
28 .\" FIXME
29 .\" 2.6.32 added MADV_HWPOISON, MADV_MERGEABLE, and MADV_UNMERGEABLE
30 .\" 2.6.33 added MADV_SOFT_OFFLINE
31 .\"
32 .\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
33 .\" Translated Thu Aug 16 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
34 .\" Updated Tue 8 Oct 2002 by NAKANO Takeo
35 .\" Updated 2007-01-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.43
36 .\"
37 .TH MADVISE 2 2008-04-22 "Linux" "Linux Programmer's Manual"
38 .\"O .SH NAME
39 .\"O madvise \- give advice about use of memory
40 .SH Ì¾Á°
41 madvise \- ¥á¥â¥êÍøÍѤ˴ؤ¹¤ë¥¢¥É¥Ð¥¤¥¹¤òÍ¿¤¨¤ë
42 .\"O .SH SYNOPSIS
43 .SH ½ñ¼°
44 .B #include <sys/mman.h>
45 .sp
46 .BI "int madvise(void *" addr ", size_t " length ", int " advice );
47 .sp
48 .in -4n
49 .\"O Feature Test Macro Requirements for glibc (see
50 .\"O .BR feature_test_macros (7)):
51 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
52 .RB ( feature_test_macros (7)
53 »²¾È):
54 .in
55 .sp
56 .BR madvise ():
57 _BSD_SOURCE
58 .\"O .SH DESCRIPTION
59 .SH ÀâÌÀ
60 .\"O The
61 .\"O .BR madvise ()
62 .\"O system call advises the kernel about how to handle paging input/output in
63 .\"O the address range beginning at address
64 .\"O .I addr
65 .\"O and with size
66 .\"O .I length
67 .\"O bytes.
68 .\"O It allows an application to tell the kernel how it expects to use
69 .\"O some mapped or shared memory areas, so that the kernel can choose
70 .\"O appropriate read-ahead and caching techniques.
71 .\"O This call does not influence the semantics of the application
72 .\"O (except in the case of
73 .\"O .BR MADV_DONTNEED ),
74 .\"O but
75 .\"O may influence its performance.
76 .\"O The kernel is free to ignore the advice.
77 .BR madvise ()
78 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¥¢¥É¥ì¥¹
79 .I addr
80 ¤«¤é¤Ï¤¸¤Þ¤ë
81 .I length
82 ¥Ð¥¤¥È¤Î¥á¥â¥ê¥Ö¥í¥Ã¥¯¤Î¥Ú¡¼¥¸¥ó¥°Æþ½ÐÎϤò¤É¤¦°·¤¨¤ÐÎɤ¤¤«¡¢
83 ¥«¡¼¥Í¥ë¤Ë¥¢¥É¥Ð¥¤¥¹¤¹¤ë¡£
84 ¤³¤ì¤òÍѤ¤¤ë¤È¡¢
85 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤é¥«¡¼¥Í¥ë¤Ë¡¢
86 ¥Þ¥Ã¥×¤µ¤ì¤¿¥á¥â¥ê¤ä¶¦Í­¥á¥â¥ê¤ò¤É¤Î¤è¤¦¤Ë°·¤Ã¤Æ¤Û¤·¤¤¤«ÅÁ¤¨¤ë¤³¤È¤¬¤Ç¤­¡¢
87 ¥«¡¼¥Í¥ë¤Ï¤½¤ì¤Ë±þ¤¸¤ÆÀèÆɤߤ䥭¥ã¥Ã¥·¥å¤Ê¤É¤ÎŬÀڤʼêË¡¤òÁªÂò¤Ç¤­¤ë¡£
88 ¤³¤Î¥³¡¼¥ë¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÆ°ºî¤½¤Î¤â¤Î¤Ë¤Ï±Æ¶Á¤·¤Ê¤¤
89 .RB ( MADV_DONTNEED
90 ¤Î¾ì¹ç¤ÏÊÌ) ¤¬¡¢
91 À­Ç½¤Ë¤Ï±Æ¶Á¤·¤¦¤ë¡£
92 ¤Ê¤ª¤³¤Î¥¢¥É¥Ð¥¤¥¹¤ò¼õ¤±Æþ¤ì¤ë¤«¤É¤¦¤«¤Ï¥«¡¼¥Í¥ë¤ËǤ¤µ¤ì¤ë¡£
93 .LP
94 .\"O The advice is indicated in the
95 .\"O .I advice
96 .\"O argument which can be
97 ¥¢¥É¥Ð¥¤¥¹¤Ï°ú¤­¿ô
98 .I advice
99 ¤Ë¤è¤Ã¤ÆÍ¿¤¨¤ë¡£°Ê²¼¤Î¤¤¤º¤ì¤«¤ò»ØÄê¤Ç¤­¤ë¡£
100 .TP
101 .B MADV_NORMAL
102 .\"O No special treatment.
103 .\"O This is the default.
104 ÆÃÊ̤ʰ·¤¤¤Ï¹Ô¤ï¤Ê¤¤¡£¤³¤ì¤¬¥Ç¥Õ¥©¥ë¥È¤Ç¤¢¤ë¡£
105 .TP
106 .B MADV_RANDOM
107 .\"O Expect page references in random order.
108 .\"O (Hence, read ahead may be less useful than normally.)
109 ¥Ú¡¼¥¸»²¾È¤Ï¥é¥ó¥À¥à¤Ê½ç½ø¤Ç¹Ô¤ï¤ì¤½¤¦¤À¡£
110 (¤·¤¿¤¬¤Ã¤Æ¡¢ÀèÆɤߤϤ¢¤Þ¤ê¸ú²Ì¤¬¤Ê¤µ¤½¤¦¤À¡£)
111 .TP
112 .B MADV_SEQUENTIAL
113 .\"O Expect page references in sequential order.
114 .\"O (Hence, pages in the given range can be aggressively read ahead,
115 .\"O and may be freed soon after they are accessed.)
116 ¥Ú¡¼¥¸»²¾È¤Ï¥·¡¼¥±¥ó¥·¥ã¥ë¤Ê½ç½ø¤Ç¹Ô¤ï¤ì¤½¤¦¤À¡£
117 (¤·¤¿¤¬¤Ã¤ÆÍ¿¤¨¤¿ÈϰϤΥڡ¼¥¸¤ÏÀѶËŪ¤ËÀèÆɤߤ·¤Æ¤ª¤¯¤ÈÎɤ¤¤À¤í¤¦¡£
118 ¤Þ¤¿¥¢¥¯¥»¥¹¤¬½ª¤ï¤Ã¤¿¤é®¤ä¤«¤Ë²òÊü¤·¤ÆÎɤ¤¡£)
119 .TP
120 .B MADV_WILLNEED
121 .\"O Expect access in the near future.
122 .\"O (Hence, it might be a good idea to read some pages ahead.)
123 ¶á¤¤¾­Íè¤Ë¥¢¥¯¥»¥¹¤µ¤ì¤½¤¦¤À¡£
124 (¤·¤¿¤¬¤Ã¤Æ¤³¤ì¤é¤Î¥Ú¡¼¥¸¤òº£¤Î¤¦¤Á¤ËÀèÆɤߤ·¤Æ¤ª¤¯¤È¤¤¤¤¤À¤í¤¦¡£)
125 .TP
126 .B MADV_DONTNEED
127 .\"O Do not expect access in the near future.
128 .\"O (For the time being, the application is finished with the given range,
129 .\"O so the kernel can free resources associated with it.)
130 ¤·¤Ð¤é¤¯¥¢¥¯¥»¥¹¤Ï¤Ê¤µ¤½¤¦¤À¡£
131 (¸½»þÅÀ¤Ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÏÍ¿¤¨¤¿ÈϰϤνèÍý¤ò½ª¤¨¤Æ¤¤¤ë¡£
132 ¤·¤¿¤¬¤Ã¤Æ¥«¡¼¥Í¥ë¤Ï¤³¤ì¤Ë´ØÏ¢¤¹¤ë¥ê¥½¡¼¥¹¤ò²òÊü¤·¤ÆÎɤ¤¡£)
133 .\"O Subsequent accesses of pages in this range will succeed, but will result
134 .\"O either in reloading of the memory contents from the underlying mapped file
135 .\"O (see
136 .\"O .BR mmap (2))
137 .\"O or zero-fill-on-demand pages for mappings
138 .\"O without an underlying file.
139 ¤³¤ì°Ê¹ß¤³¤ÎÈϰϤΥڡ¼¥¸¤Ø¤Î¥¢¥¯¥»¥¹¤¬¤¢¤ë¤È¡¢
140 À®¸ù¤Ï¤¹¤ë¤¬¡¢¥á¥â¥ê¤ÎÆâÍƤò¥Þ¥Ã¥×¸µ¤Î¥Õ¥¡¥¤¥ë¤«¤é¥í¡¼¥É¤·Ä¾¤¹¤³¤È¤Ë¤Ê¤ë
141 .RB ( mmap (2)
142 ¤ò¸«¤è) ¤«¡¢
143 ¤Þ¤¿¤Ï¸µ¥Õ¥¡¥¤¥ë¤¬¤Ê¤¤¥Þ¥Ã¥×¥Ú¡¼¥¸¤Ç¤Ï
144 ¥¢¥¯¥»¥¹¤¬¤¢¤Ã¤¿¤È¤­¤Ë 0 Ëä¤á¤¬¹Ô¤ï¤ì¤ë¤³¤È¤Ë¤Ê¤ë¡£
145 .TP
146 .\"O .BR MADV_REMOVE " (Since Linux 2.6.16)"
147 .BR MADV_REMOVE " (Linux 2.6.16 °Ê¹ß)"
148 .\"O Free up a given range of pages
149 .\"O and its associated backing store.
150 .\"O Currently,
151 .\"O .\" 2.6.18-rc5
152 .\"O only shmfs/tmpfs supports this; other file systems return with the
153 .\"O error
154 .\"O .BR ENOSYS .
155 »ØÄꤵ¤ì¤¿ÈϰϤΥڡ¼¥¸¤È´ØÏ¢¤¹¤ë¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢¤ò²òÊü¤¹¤ë¡£
156 ¸½ºß¤Î¤È¤³¤í¡¢
157 .\" 2.6.18-rc5
158 shmfs/tmpfs ¤À¤±¤¬¤³¤ì¤ËÂбþ¤·¤Æ¤¤¤ë¡£
159 ¾¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤Ï
160 .B ENOSYS
161 ¤¬ÊÖ¤µ¤ì¤ë¡£
162 .\" Databases want to use this feature to drop a section of their
163 .\" bufferpool (shared memory segments) - without writing back to
164 .\" disk/swap space. This feature is also useful for supporting
165 .\" hot-plug memory on UML.
166 .TP
167 .\"O .BR MADV_DONTFORK " (Since Linux 2.6.16)"
168 .BR MADV_DONTFORK " (Linux 2.6.16 °Ê¹ß)"
169 .\" See http://lwn.net/Articles/171941/
170 .\"O Do not make the pages in this range available to the child after a
171 .\"O .BR fork (2).
172 .\"O This is useful to prevent copy-on-write semantics from changing
173 .\"O the physical location of a page(s) if the parent writes to it after a
174 .\"O .BR fork (2).
175 .\"O (Such page relocations cause problems for hardware that
176 .\"O DMAs into the page(s).)
177 .BR fork (2)
178 ¤¬¹Ô¤ï¤ì¤¿¸å¡¢»ØÄꤵ¤ì¤¿ÈϰϤΥڡ¼¥¸¤ò»Ò¥×¥í¥»¥¹¤¬ÍøÍѤǤ­¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡£
179 ¤³¤Îµ¡Ç½¤Ï¡¢½ñ¤­¹þ¤ß»þ¥³¥Ô¡¼ (copy-on-write) Êý¼°¤Ç¡¢
180 .BR fork (2)
181 ¤Î¸å¤Ç¿Æ¥×¥í¥»¥¹¤¬¥Ú¡¼¥¸¤Ë½ñ¤­¹þ¤ß¤ò¹Ô¤Ã¤¿¾ì¹ç¤Ë
182 ¥Ú¡¼¥¸¤ÎʪÍý°ÌÃÖ¤¬ÊѲ½¤·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤Î¤ËÍ­¸ú¤Ç¤¢¤ë
183 (¥Ú¡¼¥¸¤ÎºÆÇÛÃ֤ϥϡ¼¥É¥¦¥§¥¢¤¬¤½¤Î¥Ú¡¼¥¸¤Ë DMA Å¾Á÷¤ò¹Ô¤¦¤è¤¦¤Ê¾ì¹ç¤Ë
184 ÌäÂê¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë)¡£
185 .\" [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
186 .\" Currently, copy-on-write may change the physical address of
187 .\" a page even if the user requested that the page is pinned in
188 .\" memory (either by mlock or by get_user_pages). This happens
189 .\" if the process forks meanwhile, and the parent writes to that
190 .\" page.  As a result, the page is orphaned: in case of
191 .\" get_user_pages, the application will never see any data hardware
192 .\" DMA's into this page after the COW.  In case of mlock'd memory,
193 .\" the parent is not getting the realtime/security benefits of mlock.
194 .\"
195 .\" In particular, this affects the Infiniband modules which do DMA from
196 .\" and into user pages all the time.
197 .\"
198 .\" This patch adds madvise options to control whether memory range is
199 .\" inherited across fork. Useful e.g. for when hardware is doing DMA
200 .\" from/into these pages.  Could also be useful to an application
201 .\" wanting to speed up its forks by cutting large areas out of
202 .\" consideration.
203 .\"
204 .\" SEE ALSO: http://lwn.net/Articles/171941/
205 .\" "Tweaks to madvise() and posix_fadvise()", 14 Feb 2006
206 .TP
207 .\"O .BR MADV_DOFORK " (Since Linux 2.6.16)"
208 .BR MADV_DOFORK " (Linux 2.6.16 °Ê¹ß)"
209 .\"O Undo the effect of
210 .\"O .BR MADV_DONTFORK ,
211 .\"O restoring the default behavior, whereby a mapping is inherited across
212 .\"O .BR fork (2).
213 .B MADV_DONTFORK
214 ¤Î±Æ¶Á¤ò¼è¤ê¾Ã¤·¡¢¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤ËÌ᤹¡£
215 ¤Ä¤Þ¤ê¡¢
216 .BR fork (2)
217 ¤ÎÁ°¸å¤Ç¥Þ¥Ã¥Ô¥ó¥°¤Ï·Ñ¾µ¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ë¡£
218 .\"O .SH "RETURN VALUE"
219 .SH ÊÖ¤êÃÍ
220 .\"O On success
221 .\"O .BR madvise ()
222 .\"O returns zero.
223 .\"O On error, it returns \-1 and
224 .\"O .I errno
225 .\"O is set appropriately.
226 .BR madvise ()
227 ¤ÏÀ®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£
228 ¥¨¥é¡¼¤¬µ¯¤³¤ë¤È \-1 ¤òÊÖ¤·¡¢
229 .I errno
230 ¤òŬÀÚ¤ÊÃͤËÀßÄꤹ¤ë¡£
231 .\"O .SH ERRORS
232 .SH ¥¨¥é¡¼
233 .TP
234 .B EAGAIN
235 .\"O A kernel resource was temporarily unavailable.
236 ²¿¤é¤«¤Î¥«¡¼¥Í¥ë¥ê¥½¡¼¥¹¤¬°ì»þŪ¤ËÍøÍѤǤ­¤Ê¤«¤Ã¤¿¡£
237 .TP
238 .B EBADF
239 .\"O The map exists, but the area maps something that isn't a file.
240 »ØÄꤷ¤¿¥Þ¥Ã¥×¤Ï¸ºß¤¹¤ë¤¬¡¢¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¤¤È¤³¤í¤ò¥Þ¥Ã¥×¤·¤Æ¤¤¤ë¡£
241 .TP
242 .B EINVAL
243 .\"O The value
244 .\"O .I len
245 .\"O is negative,
246 .\" .I len
247 .\" is zero,
248 .\"O .I addr
249 .\"O is not page-aligned,
250 .\"O .I advice
251 .\"O is not a valid value, or the application is attempting
252 .\"O to release locked or shared pages (with
253 .\"O .BR MADV_DONTNEED ).
254 .I len
255 ¤ÎÃͤ¬Éé¡¢
256 .I addr
257 ¤¬¥Ú¡¼¥¸¶­³¦¤Ç¤Ê¤¤¡¢
258 .I advice
259 ¤¬Àµ¤·¤¤ÃͤǤʤ¤¡¢
260 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¥í¥Ã¥¯¤µ¤ì¤¿¥Ú¡¼¥¸¤ä¶¦Í­¥Ú¡¼¥¸¤ò
261 .RB ( MADV_DONTNEED
262 ¤Ç) ²òÊü¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¡¢¤Ê¤É¡£
263 .TP
264 .B EIO
265 .\"O (for
266 .\"O .BR MADV_WILLNEED )
267 .\"O Paging in this area would exceed the process's
268 .\"O maximum resident set size.
269 .RB ( MADV_WILLNEED
270 ¤Î¾ì¹ç) ¤³¤ÎÈϰϤΥڡ¼¥¸¥ó¥°¤ò¹Ô¤¦¤È¡¢
271 ¥×¥í¥»¥¹¤Î RSS (resident set size) ¤ÎºÇÂçÃͤò±Û¤¨¤Æ¤·¤Þ¤¦¡£
272 .\"nakano RSS ¤ÏÌõ¸ì¤¬¤¢¤ê¤Þ¤·¤¿¤Ã¤±?
273 .TP
274 .B ENOMEM
275 .\"O (for
276 .\"O .BR MADV_WILLNEED )
277 .\"O Not enough memory: paging in failed.
278 .RB ( MADV_WILLNEED
279 ¤Î¾ì¹ç) ¥á¥â¥ê¤¬Â­¤ê¤º¡¢¥Ú¡¼¥¸¥ó¥°¤Ë¼ºÇÔ¤·¤¿¡£
280 .TP
281 .B ENOMEM
282 .\"O Addresses in the specified range are not currently
283 .\"O mapped, or are outside the address space of the process.
284 »ØÄꤷ¤¿ÈϰϤΥ¢¥É¥ì¥¹¤¬¡¢¸½ºß¥Þ¥Ã¥×¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
285 ¤¢¤ë¤¤¤Ï¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤ÎÆâÉô¤Ë¤Ê¤¤¡£
286 .\"O .SH "CONFORMING TO"
287 .SH ½àµò
288 POSIX.1b.
289 .\"O POSIX.1-2001 describes
290 .\"O .BR posix_madvise (3)
291 .\"O .\" FIXME . Write a posix_fadvise(3) page.
292 .\"O with constants
293 .\"O .BR POSIX_MADV_NORMAL ,
294 .\"O etc.,
295 .\"O with a behavior close to that described here.
296 .\"O There is a similar
297 .\"O .BR posix_fadvise (2)
298 .\"O for file access.
299 POSIX.1-2001 ¤Ç¤Ï¡¢
300 .BR posix_madvise (3)
301 .\" FIXME . Write a posix_fadvise(3) page.
302 ¤ò
303 .B POSIX_MADV_NORMAL
304 ¤Ê¤É¤ÎÄê¿ô¤È¤È¤â¤Ëµ­½Ò¤·¤Æ¤¤¤¿
305 (¤½¤ì¤¾¤ì¤Î¿¶¤ëÉñ¤¤¤Ï¤³¤³¤Ç½Ò¤Ù¤¿¤â¤Î¤Ë¶á¤¤)¡£
306 ¥Õ¥¡¥¤¥ë¥¢¥¯¥»¥¹¤ËÂФ·¤Æ¤â
307 .BR posix_fadvise (2)
308 ¤È¤¤¤¦Îà»÷¤Î´Ø¿ô¤¬Â¸ºß¤¹¤ë¡£
309
310 .\"O .BR MADV_REMOVE ,
311 .\"O .BR MADV_DONTFORK ,
312 .\"O and
313 .\"O .B MADV_DOFORK
314 .\"O are Linux-specific.
315 .BR MADV_REMOVE ,
316 .BR MADV_DONTFORK ,
317 .B MADV_DOFORK
318 ¤Ï Linux ¸ÇÍ­¤Ç¤¢¤ë¡£
319 .\"O .SH NOTES
320 .\"O .SS "Linux Notes"
321 .SH Ãí°Õ
322 .SS "Linux ¤Ç¤ÎÃí°Õ"
323 .\"O .LP
324 .\"O The current Linux implementation (2.4.0) views this system call
325 .\"O more as a command than as advice and hence may return an error
326 .\"O when it cannot do what it usually would do in response to this
327 .\"O advice.
328 .\"O (See the ERRORS description above.)
329 .\"O This is nonstandard behavior.
330 ¸½ºß¤Î Linux ¤Î¼ÂÁõ (2.4.0) ¤Ç¤Ï¡¢
331 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò¥¢¥É¥Ð¥¤¥¹¤È¤¤¤¦¤è¤ê¤ÏÌ¿Îá¤È¸«¤Æ¤¤¤ë¡£
332 ¤·¤¿¤¬¤Ã¤Æ¤³¤Î¥¢¥É¥Ð¥¤¥¹¤ËÂФ·¤ÆÄ̾ï¹Ô¤ï¤ì¤ëÆ°ºî¤¬ÉÔ²Äǽ¤Ê¾ì¹ç¤Ï¡¢
333 ¥¨¥é¡¼¤òÊÖ¤¹¤³¤È¤¬¤¢¤ë (¾åµ­¤Î ¥¨¥é¡¼ ¤Îµ­½Ò¤ò»²¾È)¡£
334 ¤³¤Î¿¶Éñ¤¤¤Ïɸ½à¤È¤Ï°Û¤Ê¤ë¡£
335 .LP
336 .\"O The Linux implementation requires that the address
337 .\"O .I addr
338 .\"O be page-aligned, and allows
339 .\"O .I length
340 .\"O to be zero.
341 .\"O If there are some parts of the specified address range
342 .\"O that are not mapped, the Linux version of
343 .\"O .BR madvise ()
344 .\"O ignores them and applies the call to the rest (but returns
345 .\"O .B ENOMEM
346 .\"O from the system call, as it should).
347 Linux ¤Î¼ÂÁõ¤Ç¤Ï
348 .I addr
349 ¤Î¥¢¥É¥ì¥¹¤Ï¥Ú¡¼¥¸¶­³¦¤ÎÃͤǤʤ±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤Þ¤¿
350 .I length
351 ¤Ï 0 ¤Ç¤¢¤Ã¤Æ¤â¹½¤ï¤Ê¤¤¡£
352 ¤Þ¤¿ Linux ÈǤÎ
353 .BR madvise ()
354 ¤Ç¤Ï¡¢»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹ÈϰϤ˥ޥåפµ¤ì¤Æ¤¤¤Ê¤¤Éôʬ¤¬¤¢¤ë¤È¡¢
355 ¤³¤ì¤é¤ò̵»ë¤·¤Æ»Ä¤ê¤ÎÉôʬ¤Ë¥¢¥É¥Ð¥¤¥¹¤òŬÍѤ¹¤ë
356 (¤·¤«¤·¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ·¤Æ¤Ï¤Á¤ã¤ó¤È
357 .B ENOMEM
358 ¤òÊÖ¤¹)¡£
359 .\"O .\" .SH HISTORY
360 .\" .SH Îò»Ë
361 .\"O .\" The
362 .\"O .\" .BR madvise ()
363 .\"O .\" function first appeared in 4.4BSD.
364 .\" .BR madvise ()
365 .\" ´Ø¿ô¤Ï 4.4BSD ¤ÇºÇ½é¤ËÅо줷¤¿¡£
366 .\"O .SH "SEE ALSO"
367 .SH ´ØÏ¢¹àÌÜ
368 .BR getrlimit (2),
369 .BR mincore (2),
370 .BR mmap (2),
371 .BR mprotect (2),
372 .BR msync (2),
373 .BR munmap (2)