OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / man2 / remap_file_pages.2
1 .\" Copyright (C) 2003, Michael Kerrisk (mtk.manpages@gmail.com)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" 2003-12-10 Initial creation, Michael Kerrisk <mtk.manpages@gmail.com>
24 .\" 2004-10-28 aeb, corrected prototype, prot must be 0
25 .\"
26 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
27 .\"         all rights reserved.
28 .\" Translated Thu Jun 24 06:00:37 JST 2004
29 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
30 .\" Updated & Modified Mon Jan  3 02:50:11 JST 2005 by Yuichi SATO
31 .\" Updated & Modified Mon Oct 10 01:15:38 JST 2005
32 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
33 .\"
34 .TH REMAP_FILE_PAGES 2 2008-04-22 "Linux" "Linux Programmer's Manual"
35 .SH Ì¾Á°
36 remap_file_pages \- ÈóÀþ·Á¥Õ¥¡¥¤¥ë¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤¹¤ë¡£
37 .SH ½ñ¼°
38 .nf
39 .B #define _GNU_SOURCE
40 .B #include <sys/mman.h>
41 .sp
42 .BI "int remap_file_pages(void *" addr ", size_t " size ", int " prot ,
43 .BI "                     ssize_t " pgoff ", int " flags );
44 .fi
45 .SH ÀâÌÀ
46 .BR remap_file_pages ()
47 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤ÏÈóÀþ·Á¤Ê¥Þ¥Ã¥Ô¥ó¥°¡¢
48 ¤Ä¤Þ¤ê¥Õ¥¡¥¤¥ë¤Î¥Ú¡¼¥¸¤¬¥á¥â¥ê¾å¤ÇϢ³¤·¤Ê¤¤½çÈ֤ǥޥåפµ¤ì¤ë
49 ¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
50 .BR remap_file_pages ()
51 ¤ò»È¤¦Êý¤¬
52 .BR mmap (2)
53 ¤ò·«¤êÊÖ¤·¤Æ»È¤¦¤è¤êÍ¥¤ì¤Æ¤¤¤ëÅÀ¤Ï¡¢
54 Á°¼Ô¤ÎÊýË¡¤Ç¤Ï¥«¡¼¥Í¥ë¤¬ VMA (Virtual Memory Area, ²¾ÁÛ¥á¥â¥êÎΰè)
55 ¥Ç¡¼¥¿¹½Â¤ÂΤòÄɲäǺîÀ®¤¹¤ëɬÍפ¬¤Ê¤¤¤³¤È¤Ç¤¢¤ë¡£
56
57 ÈóÀþ·Á¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤¹¤ë¤¿¤á¤Ë¤Ï¡¢
58 °Ê²¼¤Î¤è¤¦¤Ê¥¹¥Æ¥Ã¥×¤ò¼Â¹Ô¤¹¤ë:
59 .TP 3
60 1.
61 .BR mmap (2)
62 ¤ò»È¤¤¡¢¥Þ¥Ã¥Ô¥ó¥°¤òºîÀ®¤¹¤ë (¤³¤Î¥Þ¥Ã¥Ô¥ó¥°¤ÏºÇ½é¤ÏÀþ·Á¤Ç¤¢¤ë)¡£
63 ¤³¤Î¥Þ¥Ã¥Ô¥ó¥°¤Ï
64 .B MAP_SHARED
65 ¥Õ¥é¥°¤ò»ØÄꤷ¤ÆºîÀ®¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
66 .TP
67 2.
68 .BR remap_file_pages ()
69 ¤ò 1 ²ó°Ê¾å¸Æ¤Ó½Ð¤·¤Æ¡¢
70 ¥Þ¥Ã¥Ô¥ó¥°¤Î¥Ú¡¼¥¸¤È¥Õ¥¡¥¤¥ë¤Î¥Ú¡¼¥¸¤ÎÂбþ´Ø·¸¤òºÆ¹½À®¤¹¤ë¡£
71 ¥Õ¥¡¥¤¥ë¤ÎƱ¤¸¥Ú¡¼¥¸¤ò¥Þ¥Ã¥Ô¥ó¥°Îΰè¤ÎÊ£¿ô¤Î¾ì½ê¤Ë
72 ¥Þ¥Ã¥×¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤ë¡£
73 .LP
74 .I pgoff
75 ¤È
76 .I size
77 °ú¤­¿ô¤Ï¡¢¥Þ¥Ã¥Ô¥ó¥°Æâ¤ÇºÆÇÛÃÖ¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤ÎÎΰè¤ò»ØÄꤹ¤ë¡£
78 .I pgoff
79 ¤Ï¥Õ¥¡¥¤¥ë¥ª¥Õ¥»¥Ã¥È¤Ç¤¢¤ê¡¢Ã±°Ì¤Ï¥·¥¹¥Æ¥à¤Î¥Ú¡¼¥¸¥µ¥¤¥º¤Ç¤¢¤ë¡£
80 .I size
81 ¤ÏÎΰè¤ÎŤµ¤Ç¤¢¤ê¡¢Ã±°Ì¤Ï¥Ð¥¤¥È¤Ç¤¢¤ë¡£
82
83 .I addr
84 °ú¤­¿ô¤Ï 2 ¤Ä¤ÎÌÜŪ¤Ç»È¤ï¤ì¤ë¡£
85 Âè 1 ¤ÎÌÜŪ¤Ï¡¢¤³¤Î°ú¤­¿ô¤Ë¤è¤Ã¤ÆºÆÊÔÀ®¤·¤¿¤¤¥Ú¡¼¥¸¤Î
86 ¥Þ¥Ã¥Ô¥ó¥°¤ò¼±Ê̤¹¤ë¤³¤È¤Ç¤¢¤ë¡£
87 ¤è¤Ã¤Æ
88 .I addr
89 ¤Ï
90 .BR mmap (2)
91 ¤Î¸Æ¤Ó½Ð¤·¤Ç²áµî¤Ë¥Þ¥Ã¥×¤µ¤ì¤¿ÎΰèÆâ¤Î¥¢¥É¥ì¥¹¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
92 Âè 2 ¤ÎÌÜŪ¤Ï¡¢
93 .I pgoff
94 ¤È
95 .I size
96 ¤Ç¼±Ê̤µ¤ì¤ë¥Õ¥¡¥¤¥ë¥Ú¡¼¥¸¤¬ÃÖ¤«¤ì¤ëͽÄê¤Î¥¢¥É¥ì¥¹¤ò¡¢
97 .I addr
98 ¤Ë¤è¤Ã¤Æ»ØÄꤹ¤ë¤³¤È¤Ç¤¢¤ë¡£
99
100 .I addr
101 ¤È
102 .I size
103 ¤Ë»ØÄꤹ¤ëÃͤϡ¢¥·¥¹¥Æ¥à¤Î¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÇÜ¿ô¤È¤¹¤Ù¤­¤Ç¤¢¤ë¡£
104 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥«¡¼¥Í¥ë¤Ï¡ÖξÊý¡×¤ÎÃͤò
105 ºÇ¤â¶á¤¤¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÇÜ¿ô¤Ø¡ÖÀڤ겼¤²¤ë¡×¡£
106 .\" ¤³¤Î´Ý¤á½èÍý¤ÏÉ÷ÊѤï¤ê¤Ç¡¢munmap()/mprotect() ¤ä mlock() ¤Î
107 .\" Æ±Íͤΰú¤­¿ô¤Î½èÍýÊýË¡¤È¤âÌ·½â¤¹¤ë¡£
108 .\" MTK, 14 Sep 2005
109
110 .I prot
111 °ú¤­¿ô¤Ï 0 ¤Ë»ØÄꤵ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
112
113 .I flags
114 °ú¤­¿ô¤Ï
115 .BR mmap (2)
116 ¤Î¤â¤Î¤ÈƱ¤¸°ÕÌ£¤Ç¤¢¤ë¤¬¡¢
117 .B MAP_NONBLOCK
118 °Ê³°¤ÎÁ´¤Æ¤Î¥Õ¥é¥°¤Ï̵»ë¤µ¤ì¤ë¡£
119 .SH ÊÖ¤êÃÍ
120 À®¸ù¤·¤¿¾ì¹ç¡¢
121 .BR remap_file_pages ()
122 ¤Ï 0 ¤òÊÖ¤¹¡£
123 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
124 .I errno
125 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
126 .SH ¥¨¥é¡¼
127 .TP
128 .B EINVAL
129 .I addr
130 ¤¬
131 .B MAP_SHARED
132 ¥Õ¥é¥°¤ò»ØÄꤷ¤ÆºîÀ®¤µ¤ì¤¿Í­¸ú¤Ê¥Þ¥Ã¥Ô¥ó¥°¤ò»²¾È¤·¤Æ¤¤¤Ê¤¤¡£
133 .TP
134 .B EINVAL
135 .IR addr ,
136 .IR size ,
137 .IR prot ,
138 .I pgoff
139 ¤Î¤¤¤º¤ì¤«¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
140 .\" ¤Þ¤¿¤Ï vma->vm_ops->populate() ¤«¤é¤Î¾¤Î¥¨¥é¡¼¤«¤â¤·¤ì¤Ê¤¤¡£
141 .SH ¥Ð¡¼¥¸¥ç¥ó
142 .BR remap_file_pages ()
143 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux 2.5.46 ¤ÇÅо줷¤¿¡£
144 glibc ¤Ç¤Î¥µ¥Ý¡¼¥È¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.3.3 ¤ÇÄɲ䵤줿¡£
145 .SH ½àµò
146 .BR remap_file_pages ()
147 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux ¸ÇÍ­¤Î¤â¤Î¤Ç¤¢¤ë¡£
148 .SH ´ØÏ¢¹àÌÜ
149 .BR getpagesize (2),
150 .BR mmap (2),
151 .BR mmap2 (2),
152 .BR mprotect (2),
153 .BR mremap (2),
154 .BR msync (2),
155 .BR feature_test_macros (7)