OSDN Git Service

(split) LDP v3.30, v3.31 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man2 / mremap.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1996 Tom Bjorkholm <tomb@mydata.se>
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\" 1996-04-11 Tom Bjorkholm <tomb@mydata.se>
26 .\"            First version written (1.3.86)
27 .\" 1996-04-12 Tom Bjorkholm <tomb@mydata.se>
28 .\"            Update for Linux 1.3.87 and later
29 .\" 2005-10-11 mtk: Added NOTES for MREMAP_FIXED; revised EINVAL text.
30 .\"
31 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
32 .\"         all rights reserved.
33 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
34 .\" Updated 2002-11-26, Kentaro Shirakata <argrath@ub32.org>
35 .\" Updated 2005-10-09, Kentaro Shirakata <argrath@ub32.org>
36 .\" Updated 2006-04-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.28
37 .\"
38 .\"WORD:        virtual memory          ²¾ÁÛ¥á¥â¥ê
39 .\"WORD:        remap                   ºÆ¥Þ¥Ã¥Ô¥ó¥°
40 .\"WORD:        argument                °ú¤­¿ô
41 .\"WORD:        address space           ¥¢¥É¥ì¥¹¶õ´Ö
42 .\"WORD:        page align              ¥Ú¡¼¥¸¶­³¦
43 .\"WORD:        linear                  ¥ê¥Ë¥¢
44 .\"WORD:        process                 ¥×¥í¥»¥¹
45 .\"WORD:        segment                 ¥»¥°¥á¥ó¥È
46 .\"WORD:        real memory             ¼Â¥á¥â¥ê
47 .\"WORD:        segmentation violation  ¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó¿¯³²
48 .\"WORD:        segmentation fault      ¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó°ãÈ¿
49 .\"WORD:        scheme                  Êý¼°
50 .\"WORD:        implement               ¼ÂÁõ
51 .\"WORD:        lock                    ¥í¥Ã¥¯
52 .\"
53 .TH MREMAP 2 2010-06-10 "Linux" "Linux Programmer's Manual"
54 .\"O .SH NAME
55 .\"O mremap \- remap a virtual memory address
56 .SH Ì¾Á°
57 mremap \- ²¾ÁÛ¥á¥â¥ê¡¦¥¢¥É¥ì¥¹¤òºÆ¥Þ¥Ã¥Ô¥ó¥°¤¹¤ë
58 .\"O .SH SYNOPSIS
59 .SH ½ñ¼°
60 .nf
61 .\"O .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
62 .BR "#define _GNU_SOURCE" "         /* feature_test_macros(7) »²¾È */"
63 .br
64 .B #include <sys/mman.h>
65 .sp
66 .BI "void *mremap(void *" old_address ", size_t " old_size ,
67 .BI "             size_t " new_size ", int " flags ", ... /* void *" new_address " */);"
68 .fi
69 .\"O .SH DESCRIPTION
70 .SH ÀâÌÀ
71 .\"O .BR mremap ()
72 .\"O expands (or shrinks) an existing memory mapping, potentially
73 .\"O moving it at the same time (controlled by the \fIflags\fP argument and
74 .\"O the available virtual address space).
75 .BR mremap ()
76 ¤Ï´û¸¤Î¥á¥â¥ê¡¦¥Þ¥Ã¥Ô¥ó¥°¤Î³ÈÄ¥ (¤Þ¤¿¤Ï½Ì¾®) ¤ò¹Ô¤¦¡£
77 Ʊ»þ¤Ë°ÜÆ°¤µ¤ì¤ë¤³¤È¤â¤¢¤ë
78 (\fIflags\fP °ú¤­¿ô¤ÈÍøÍѲÄǽ¤Ê²¾ÁÛ¥¢¥É¥ì¥¹¶õ´Ö¤Ë¤è¤Ã¤Æ·è¤Þ¤ë)¡£
79
80 .\"O \fIold_address\fP is the old address of the virtual memory block that you
81 .\"O want to expand (or shrink).
82 .\"O Note that \fIold_address\fP has to be page
83 .\"O aligned.
84 .\"O \fIold_size\fP is the old size of the
85 .\"O virtual memory block.
86 .\"O \fInew_size\fP is the requested size of the
87 .\"O virtual memory block after the resize.
88 \fIold_address\fP ¤Ï³ÈÄ¥ (¤Þ¤¿¤Ï½Ì¾®) ¤·¤è¤¦¤È¤¹¤ë²¾ÁÛ¥á¥â¥ê¡¦¥Ö¥í¥Ã¥¯
89 ¤Î¸µ¤Î¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£\fIold_address\fP ¤Ï¥Ú¡¼¥¸¶­³¦¤Ë¹ç¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð
90 ¤Ê¤é¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£\fIold_size\fP ¤Ï¸µ¤Î²¾ÁÛ¥á¥â¥ê¡¦¥Ö¥í¥Ã¥¯¤Î
91 ¥µ¥¤¥º¤Ç¤¢¤ë¡£
92 \fInew_size\fP ¤ÏÍ׵᤹¤ëÊѹ¹¸å¤Î²¾ÁÛ¥á¥â¥ê¡¦¥Ö¥í¥Ã¥¯¤Î¥µ¥¤¥º¤Ç¤¢¤ë¡£
93 .\"O An optional fifth argument,
94 .\"O .IR new_address ,
95 .\"O may be provided; see the description of
96 .\"O .B MREMAP_FIXED
97 .\"O below.
98 5 ÈÖÌܤΰú¤­¿ô¤È¤·¤Æ
99 .I new_address
100 ¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£²¼µ­¤Î
101 .B MREMAP_FIXED
102 ¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£
103
104 .\"O In Linux the memory is divided into pages.
105 .\"O A user process has (one or)
106 .\"O several linear virtual memory segments.
107 .\"O Each virtual memory segment has one
108 .\"O or more mappings to real memory pages (in the page table).
109 .\"O Each virtual memory segment has its own
110 .\"O protection (access rights), which may cause
111 .\"O a segmentation violation if the memory is accessed incorrectly (e.g.,
112 .\"O writing to a read-only segment).
113 .\"O Accessing virtual memory outside of the
114 .\"O segments will also cause a segmentation violation.
115 Linux ¤Ç¤Ï¥á¥â¥ê¤Ï¥Ú¡¼¥¸¤Ëʬ³ä¤µ¤ì¤ë¡£¥æ¡¼¥¶¡¼¡¦¥×¥í¥»¥¹¤Ï (°ì¤Ä¤Þ¤¿¤Ï)
116 Ê£¿ô¤Î¥ê¥Ë¥¢¤Ê²¾ÁÛ¥á¥â¥ê¥»¥°¥á¥ó¥È¤ò»ý¤Ä¡£
117 ¤½¤ì¤¾¤ì¤Î²¾ÁÛ¥á¥â¥ê¥»¥°¥á¥ó¥È¤Ï°ì¤Ä°Ê¾å¤Î¼Â¥á¥â¥ê¡¦¥Ú¡¼¥¸
118 ¤Ë¥Þ¥Ã¥Ô¥ó¥°¤µ¤ì¤Æ¤¤¤ë (¥Þ¥Ã¥Ô¥ó¥°¾ðÊó¤Ï¥Ú¡¼¥¸¡¦¥Æ¡¼¥Ö¥ë¤Ç´ÉÍý¤µ¤ì¤ë)¡£
119 ²¾ÁÛ¥á¥â¥ê¥»¥°¥á¥ó¥È¤Ë¤Ï¥»¥°¥á¥ó¥ÈËè¤ÎÊݸî (¥¢¥¯¥»¥¹¸¢) ¤¬ÀßÄꤵ¤ì¤Æ¤ª¤ê¡¢
120 ¥á¥â¥ê¤¬ÉÔÀµ¤Ë¥¢¥¯¥»¥¹¤µ¤ì¤¿¾ì¹ç (Î㤨¤ÐÆɤ߹þ¤ßÀìÍѤΥ»¥°¥á¥ó¥È¤Ë
121 ½ñ¤­¹þ¤ó¤À¾ì¹ç)¡¢¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó¿¯³² (segmentation violation) ¤ò
122 °ú¤­µ¯¤³¤¹¡£¤Þ¤¿¡¢¥»¥°¥á¥ó¥È³°¤Î²¾ÁÛ¥á¥â¥ê¤Ë¥¢¥¯¥»¥¹¤·¤¿¾ì¹ç¤Ë¤â
123 ¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó¿¯³²¤¬È¯À¸¤¹¤ë¡£
124
125 .\"O .BR mremap ()
126 .\"O uses the Linux page table scheme.
127 .\"O .BR mremap ()
128 .\"O changes the
129 .\"O mapping between virtual addresses and memory pages.
130 .\"O This can be used to implement a very efficient
131 .\"O .BR realloc (3).
132 .BR mremap ()
133 ¤Ï Linux ¤Î¥Ú¡¼¥¸¡¦¥Æ¡¼¥Ö¥ëÊý¼°¤ò»ÈÍѤ¹¤ë¡£
134 .BR mremap ()
135 ¤Ï²¾ÁÛ¥¢¥É¥ì¥¹¤È¥á¥â¥ê¡¦¥Ú¡¼¥¸¤Î¥Þ¥Ã¥Ô¥ó¥°¤òÊѹ¹¤¹¤ë¡£¤³¤ì¤ÏÈó¾ï¤Ë¸úΨŪ¤Ê
136 .BR realloc (3)
137 ¤ò¼ÂÁõ¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£
138
139 .\"O The \fIflags\fP bit-mask argument may be 0, or include the following flag:
140 \fIflags\fP ¥Ó¥Ã¥È¥Þ¥¹¥¯°ú¿ô¤Ï 0 ¤Þ¤¿¤Ï°Ê²¼¤Î¥Õ¥é¥°¤ò´Þ¤à:
141 .TP
142 .B MREMAP_MAYMOVE
143 .\"O By default, if there is not sufficient space to expand a mapping
144 .\"O at its current location, then
145 .\"O .BR mremap ()
146 .\"O fails.
147 ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¸½ºß¤Î°ÌÃ֤˥ޥåԥ󥰤ò³ÈÄ¥¤¹¤ë¤¿¤á¤Î
148 ½½Ê¬¤Ê¶õ¤­¤¬¤Ê¤±¤ì¤Ð
149 .BR mremap ()
150 ¤Ï¼ºÇÔ¤¹¤ë¡£
151 .\"O If this flag is specified, then the kernel is permitted to
152 .\"O relocate the mapping to a new virtual address, if necessary.
153 ¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤ë¤È¡¢¥«¡¼¥Í¥ë¤ÏɬÍפ¬¤¢¤ì¤Ð¥Þ¥Ã¥Ô¥ó¥°¤ò
154 ¿·¤·¤¤²¾ÁÛ¥¢¥É¥ì¥¹¤ËºÆÇÛÃÖ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë
155 .\"O If the mapping is relocated,
156 .\"O then absolute pointers into the old mapping location
157 .\"O become invalid (offsets relative to the starting address of
158 .\"O the mapping should be employed).
159 ¥Þ¥Ã¥Ô¥ó¥°¤¬ºÆÇÛÃÖ¤µ¤ì¤ë¤È¡¢¸Å¤¤¥Þ¥Ã¥Ô¥ó¥°°ÌÃ֤ؤÎÀäÂХݥ¤¥ó¥¿¤Ï
160 ̵¸ú¤Ë¤Ê¤ë (¥Þ¥Ã¥Ô¥ó¥°¤Î³«»Ï¥¢¥É¥ì¥¹¤«¤é¤ÎÁêÂÐ¥ª¥Õ¥»¥Ã¥È¤ÏÍ­¸ú¤Î¤Þ¤Þ¤Ç¤¢¤ë)¡£
161 .TP
162 .\"O .BR MREMAP_FIXED " (since Linux 2.3.31)"
163 .BR MREMAP_FIXED " (Linux 2.3.31 °Ê¹ß)"
164 .\"O This flag serves a similar purpose to the
165 .\"O .B MAP_FIXED
166 .\"O flag of
167 .\"O .BR mmap (2).
168 ¤³¤Î¥Õ¥é¥°¤Ï
169 .BR mmap (2)
170 ¤Î
171 .B MAP_FIXED
172 ¥Õ¥é¥°¤È»÷¤¿¤è¤¦¤ÊÌÜŪ¤ÇÍѤ¤¤é¤ì¤ë¡£
173 .\"O If this flag is specified, then
174 .\"O .BR mremap ()
175 .\"O accepts a fifth argument,
176 .\"O .IR "void *new_address" ,
177 .\"O which specifies a page-aligned address to which the mapping must
178 .\"O be moved.
179 ¤³¤Î¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤ë¤È¡¢
180 .BR mremap ()
181 ¤Ï 5 ÈÖÌܤΰú¤­¿ô
182 .I "void *new_address"
183 ¤ò¼õ¤±¼è¤ê¡¢¤³¤Î°ú¿ô¤Ï¥Þ¥Ã¥Ô¥ó¥°¤¬°ÜÆ°¤µ¤ì¤ë¤Ù¤­¥¢¥É¥ì¥¹¤ò»ØÄꤹ¤ë¡£
184 ¤³¤Î¥¢¥É¥ì¥¹¤Ï¥Ú¡¼¥¸¶­³¦¤Ë¹ç¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
185 .\"O Any previous mapping at the address range specified by
186 .\"O .I new_address
187 .\"O and
188 .\"O .I new_size
189 .\"O is unmapped.
190 .I new_address
191 ¤È
192 .I new_size
193 ¤Ç»ØÄꤵ¤ì¤ë¥¢¥É¥ì¥¹ÈϰϤ˲áµî¤Î¥Þ¥Ã¥Ô¥ó¥°¤¬¤¢¤Ã¤¿¾ì¹ç¡¢
194 ¤½¤Î¥Þ¥Ã¥Ô¥ó¥°¤Ï¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤ë (unmapped)¡£
195 .\"O If
196 .\"O .B MREMAP_FIXED
197 .\"O is specified, then
198 .\"O .B MREMAP_MAYMOVE
199 .\"O must also be specified.
200 .B MREMAP_FIXED
201 ¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢
202 .B MREMAP_MAYMOVE
203 ¤â»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
204 .PP
205 .\"O If the memory segment specified by
206 .\"O .I old_address
207 .\"O and
208 .\"O .I old_size
209 .\"O is locked (using
210 .\"O .BR mlock (2)
211 .\"O or similar), then this lock is maintained when the segment is
212 .\"O resized and/or relocated.
213 .\"O As a consequence, the amount of memory locked by the process may change.
214 .I old_address
215 ¤È
216 .I old_size
217 ¤Ç»ØÄꤵ¤ì¤ë¥á¥â¥ê¥»¥°¥á¥ó¥È¤¬
218 .RB ( mlock (2)
219 ¤äƱÍͤΤâ¤Î¤Ç) ¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¥»¥°¥á¥ó¥È¤Î¥µ¥¤¥º¤¬ÊѤï¤Ã¤¿¤ê
220 ºÆÇÛÃÖ¤µ¤ì¤¿¤ê¤·¤¿»þ¤Ë¥í¥Ã¥¯¤â°Ý»ý¤µ¤ì¤ë¡£
221 ¤½¤Î·ë²Ì¡¢¥×¥í¥»¥¹¤Ë¤è¤Ã¤Æ¥í¥Ã¥¯¤µ¤ì¤ë¥á¥â¥ê¤ÎÎ̤ÏÊѲ½¤¹¤ë¡£
222 .\"O .SH "RETURN VALUE"
223 .SH ÊÖ¤êÃÍ
224 .\"O On On success
225 .\"O .BR mremap ()
226 .\"O returns a pointer to the new virtual memory area.
227 .\"O On error, the value
228 .\"O .B MAP_FAILED
229 .\"O (that is, \fI(void\ *)\ \-1\fP) is returned,
230 .\"O and \fIerrno\fP is set appropriately.
231 À®¸ù¤·¤¿¾ì¹ç¤Ï
232 .BR mremap ()
233 ¤Ï¿·¤·¤¤²¾ÁÛ¥á¥â¥êÎΰè¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
234 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï
235 .B MAP_FAILED
236 (¤¹¤Ê¤ï¤Á \fI(void\ *)\ \-1\fP) ¤¬ÊÖ¤µ¤ì¡¢
237 \fIerrno\fP ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
238 .\"O .SH ERRORS
239 .SH ¥¨¥é¡¼
240 .TP
241 .B EAGAIN
242 .\"O The caller tried to expand a memory segment that is locked,
243 .\"O but this was not possible without exceeding the
244 .\"O .B RLIMIT_MEMLOCK
245 .\"O resource limit.
246 ¸Æ¤Ó½Ð¤·¸µ¤¬¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¥á¥â¥ê¥»¥°¥á¥ó¥È¤ò³ÈÄ¥¤·¤è¤¦¤È¤·¤¿¤¬¡¢
247 .B RLIMIT_MEMLOCK
248 ¥ê¥½¡¼¥¹À©¸Â¤ò±Û¤¨¤º¤Ë¤³¤ì¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£
249 .TP
250 .B EFAULT
251 .\"O "Segmentation fault." Some address in the range
252 .\"O \fIold_address\fP to \fIold_address\fP+\fIold_size\fP is an invalid
253 .\"O virtual memory address for this process.
254 .\"O You can also get
255 .\"O .B EFAULT
256 .\"O even if there exist mappings that cover the
257 .\"O whole address space requested, but those mappings are of different types.
258 ¡Ö¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó°ãÈ¿(segmentation fault)¡×
259 \fIold_address\fP ¤«¤é \fIold_address\fP+\fIold_size\fP ¤Î
260 ÈϰϤΥ¢¥É¥ì¥¹¤Î¤É¤ì¤«¤¬¤³¤Î¥×¥í¥»¥¹¤Ë¤ª¤¤¤ÆÉÔÀµ¤Ê²¾ÁÛ¥á¥â¥ê¡¦¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
261 ¤¿¤È¤¨Í׵ᤷ¤¿¥¢¥É¥ì¥¹¶õ´ÖÁ´ÂΤò´Þ¤à¤è¤¦¤Ê¥Þ¥Ã¥Ô¥ó¥°¤¬¤¢¤Ã¤¿¤È¤·¤Æ¤â¡¢
262 ¤½¤ì¤é¤Î¥Þ¥Ã¥Ô¥ó¥°¤¬°Û¤Ê¤Ã¤¿·¿¤Ê¤é¤Ð
263 .B EFAULT
264 ¤ò¼õ¤±¼è¤ë¤À¤í¤¦¡£
265 .TP
266 .B EINVAL
267 .\"O An invalid argument was given.
268 ÉÔÀµ¤Ê°ú¤­¿ô¤¬Í¿¤¨¤é¤ì¤¿¡£
269 .\"O Possible causes are: \fIold_address\fP was not
270 .\"O page aligned; a value other than
271 .\"O .B MREMAP_MAYMOVE
272 .\"O or
273 .\"O .B MREMAP_FIXED
274 .\"O was specified in
275 .\"O .IR flags ;
276 .\"O .I new_size
277 .\"O was zero;
278 .\"O .I new_size
279 .\"O or
280 .\"O .I new_address
281 .\"O was invalid;
282 .\"O or the new address range specified by
283 .\"O .I new_address
284 .\"O and
285 .\"O .I new_size
286 .\"O overlapped the old address range specified by
287 .\"O .I old_address
288 .\"O and
289 .\"O .IR old_size ;
290 .\"O or
291 .\"O .B MREMAP_FIXED
292 .\"O was specified without also specifying
293 .\"O .BR MREMAP_MAYMOVE .
294 ²ÄǽÀ­¤Î¤¢¤ë¸¶°ø¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë:
295 ¤¿¤¤¤Æ¤¤¤Ï \fIold_address\fP ¤¬¥Ú¡¼¥¸¶­³¦¤Ë
296 ¹ç¤Ã¤Æ¤Ê¤¤;
297 .I flags
298 ¤Ë
299 .B MREMAP_MAYMOVE
300 ¤Þ¤¿¤Ï
301 .B MREMAP_FIXED
302 °Ê³°¤ÎÃͤ¬»ØÄꤵ¤ì¤Æ¤¤¤ë;
303 .I new_size
304 ¤¬¥¼¥í;
305 .I new_size
306 ¤Þ¤¿¤Ï
307 .I new_address
308 ¤ÎÃͤ¬ÉÔÀµ;
309 .I new_address
310 ¤È
311 .I new_size
312 ¤Ç»ØÄꤵ¤ì¤ë¿·¤·¤¤¥¢¥É¥ì¥¹ÈϰϤ¬
313 .I old_address
314 ¤È
315 .I old_size
316 ¤Ç»ØÄꤵ¤ì¤ë¸Å¤¤¥¢¥É¥ì¥¹ÈϰϤȽŤʤäƤ¤¤ë;
317 .B MREMAP_FIXED
318 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤¬
319 .B MREMAP_MAYMOVE
320 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
321 .TP
322 .B ENOMEM
323 .\"O The memory area cannot be expanded at the current virtual address, and the
324 .\"O .B MREMAP_MAYMOVE
325 .\"O flag is not set in \fIflags\fP.
326 .\"O Or, there is not enough (virtual) memory available.
327 ¸½ºß¤Î²¾ÁÛ¥¢¥É¥ì¥¹¤Ç¤Ï¥á¥â¥êÎΰ褬³ÈÄ¥¤Ç¤­¤º¡¢
328 .B MREMAP_MAYMOVE
329 ¥Õ¥é¥°¤¬ \fIflags\fP ¤ËÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
330 ¤Þ¤¿¤Ï½½Ê¬¤Ê (²¾ÁÛ) ¥á¥â¥ê¤¬Â¸ºß¤·¤Ê¤¤¡£
331 .\"O .SH "CONFORMING TO"
332 .SH ½àµò
333 .\"O This call is Linux-specific, and should not be used in programs
334 .\"O intended to be portable.
335 .\"O .\" 4.2BSD had a (never actually implemented)
336 .\"O .\" .BR mremap (2)
337 .\"O .\" call with completely different semantics.
338 ¤³¤Î¥³¡¼¥ë¤Ï Linux ÆÃÍ­¤Ç¤¢¤ê¡¢°Ü¿¢¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç
339 »ÈÍѤ¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
340 .\" 4.2BSD ¤Ë¤Ï (¼ÂºÝ¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤¿¤ï¤±¤Ç¤Ï¤Ê¤¤¤¬)
341 .\" Á´¤¯°Û¤Ã¤¿Êý¼° (semantics) ¤Ë¤è¤ë
342 .\" .BR mremap (2)
343 .\" ¥³¡¼¥ë¤¬¤¢¤Ã¤¿¡£
344 .\" FIXME perhaps remove above statement about 4.2BSD.
345 .\"O .SH NOTES
346 .SH Ãí°Õ
347 .\"O Prior to version 2.4, glibc did not expose the definition of
348 .\"O .BR MREMAP_FIXED ,
349 .\"O and the prototype for
350 .\"O .BR mremap ()
351 .\"O did not allow for the
352 .\"O .I new_address
353 .\"O argument.
354 ¥Ð¡¼¥¸¥ç¥ó 2.4 ¤è¤êÁ°¤Î glibc ¤Ç¤Ï¡¢
355 .B MREMAP_FIXED
356 ¤ÎÄêµÁ¤Ï¸ø³«¤µ¤ì¤Æ¤ª¤é¤º¡¢
357 .BR mremap ()
358 ¤Î¥×¥í¥È¥¿¥¤¥×¤Ï
359 .I new_address
360 °ú¤­¿ô¤ò¼è¤é¤Ê¤«¤Ã¤¿¡£
361 .\"O .SH "SEE ALSO"
362 .SH ´ØÏ¢¹àÌÜ
363 .BR brk (2),
364 .BR getpagesize (2),
365 .BR getrlimit (2),
366 .BR mlock (2),
367 .BR mmap (2),
368 .BR sbrk (2),
369 .BR realloc (3),
370 .BR malloc (3)
371 .P
372 .\"O Your favorite OS text book for more information on paged memory.
373 .\"O (\fIModern Operating Systems\fP by Andrew S. Tannenbaum,
374 .\"O \fIInside Linux\fP by Randolf Bentson,
375 .\"O \fIThe Design of the UNIX Operating System\fP by Maurice J. Bach.)
376 ¥Ú¡¼¥¸Ê¬³ä¤µ¤ì¤¿¥á¥â¥ê¤Ë¤Ä¤¤¤Æ¤â¤Ã¤È¾Ü¤·¤¯ÃΤꤿ¤¤¤Ê¤é¤Ð
377 ¤¢¤Ê¤¿¤Î¹¥¤ß¤Î OS ¤Î¶µ²Ê½ñ¤ò»²¾È¤¹¤ë¤³¤È¡£
378 (\fIModern Operating Systems\fP by Andrew S. Tannenbaum,
379 \fIInside Linux\fP by Randolf Bentson,
380 \fIThe Design of the UNIX Operating System\fP by Maurice J. Bach.)