1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 2001 Bert Hubert <ahu@ds9a.nl>
.\" and Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Created Sun Jun 3 17:23:32 2001 by bert hubert <ahu@ds9a.nl>
.\" Slightly adapted, following comments by Hugh Dickins, aeb, 2001-06-04.
.\" Modified, 20 May 2003, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified, 30 Apr 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2005-04-05 mtk, Fixed error descriptions
.\" after message from <gordon.jin@intel.com>
.\" 2007-01-08 mtk, rewrote various parts
.\"
.\" Japanese Version Copyright (c) 2001-2005 Yuichi SATO
.\" all rights reserved.
.\" Translated Sun Jul 8 21:09:35 JST 2001
.\" by Yuichi SATO <ysato@h4.dion.ne.jp>
.\" Updated & Modified Sat Jul 26 13:54:03 JST 2003
.\" by Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated & Modified Fri Dec 31 05:59:40 JST 2004 by Yuichi SATO
.\" Updated & Modified Fri Apr 22 02:35:03 JST 2005 by Yuichi SATO
.\" Updated 2007-05-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.44
.\"
.\"WORD: least significant bit Dz̥ӥå
.\"
.TH MINCORE 2 2007-07-26 "Linux" "Linux Programmer's Manual"
.SH ̾
mincore \- ڡˤ뤫ɤȽꤹ
.SH
.B #include <unistd.h>
.br
.B #include <sys/mman.h>
.sp
.BI "int mincore(void *" start ", size_t " length ", unsigned char *" vec );
.sp
.in -4n
glibc εǽޥ
.RB ( feature_test_macros (7)
):
.in
.sp
.BR mincore ():
_BSD_SOURCE || _SVID_SOURCE
.SH
.BR mincore ()
ϡƤӽФץβۥΥڡ (RAM) ¸ߤ
ڡȻ˥ǥ (ڡե) ʤ
ɤ٥ȥ֤ͥϡɥ쥹
.I start
Ϥޤ
.I length
ХȤϰϤΥڡ˴ؤ¸߾֤
.I start
ϥƥΥڡܿǤʤФʤʤ
.I length
ϥڡܿǤɬפϤʤ
ڡΤ˴ؤ¸߾֤Τǡ¾
.I length
ϥڡܿڤ夲뤳Ȥˤʤ롣
ڡ
.RB ( PAGE_SIZE )
.I sysconf(_SC_PAGESIZE)
ȤäǤ롣
.I vec
ϡʤȤ
.I "(length+PAGE_SIZE\-1) / PAGE_SIZE"
ХȤǼǤؤƤʤФʤʤ
θƤӽФ֤Ȥ
ƥХȤκDz̥ӥåȤϡбڡˤΤȤ¸ߤ
åȤ졢Ǥʤϥꥢ
(ƥХȤΤ¾ΥӥåȤ̤ǤꡢΥӥåȤϾλѤ
ʤͽƤ)
.I vec
֤줿ϥʥåץåȤǤʤ
˥åƤʤڡϡǤդλǥ
äФǤθƤӽФ֤Ȥˤ
.I vec
ƤϤǤ˸ŤʤäƤ뤫⤷ʤ
.SH ֤
硢
.BR mincore ()
0 ֤
顼ξ \-1 ֤ơ
.I errno
Ŭڤͤꤹ롣
.SH 顼
.B EAGAIN
ͥ뤬Ū˥Ȥ̤Ƥ롣
.TP
.B EFAULT
.I vec
̵ʥɥ쥹ؤƤ롣
.TP
.B EINVAL
.I start
ڡܿǤʤ
.TP
.B ENOMEM
.I length
.RI ( TASK_SIZE " \- " start )
礭
.RI ( length
ͤꤵ줿硢
ͤ礭ʤȤƲᤵ뤿˵뤳Ȥ롣)
Linux 2.6.11 Ǥϡξξϥ顼
.B EINVAL
֤Ƥ
.TP
.B ENOMEM
.I start
.I start
+
.I length
δ֤˥ޥåפƤʤ꤬ä
.SH С
Linux 2.3.99pre1 glibc 2.2 ѲǽǤ롣
.SH
.BR mincore ()
POSIX.1-2001 ˵ҤƤ餺
Ƥ Unix ѲǽǤ櫓ǤϤʤ
.\" It is on at least NetBSD, FreeBSD, OpenBSD, Solaris 8,
.\" AIX 5.1, SunOS 4.1
.\" .SH
.\" .BR mincore ()
.\" ؿ 4.4BSD ǽо줷
.SH Х
ͥ 2.6.21 ϡ
.BR mincore ()
ϡ
.B MAP_PRIVATE
ޥåԥޥåԥ
.RB ( remap_file_pages (2)
Ȥäƺ) ˤĤ֤ʤä
.\" Linux Ǥ (2.6.5 θߤ˻ޤ)
.\" .B mincore
.\" MAP_PRIVATE ޥåԥˤĤƤ֤ʤ
.\" MAP_PRIVATE եޥåԥˤĤơ
.\" .B mincore
.\" Ͻԡ (copy on write) Ƥ
.\" 줿ץΥץ饤١ȥڡ֤ΤǤϤʤ
.\" եڡ¸ߤ뤫ݤ֤
.\" .I /dev/zero
.\" MAP_PRIVATE ޥåԥˤĤơ
.\" .B mincore
.\" Ͼ˥ڡ¸ߤʤȤ֤
.\" MAP_PRIVATE, MAP_ANONYMOUS ޥåԥˤĤơ
.\" .B mincore
.\" Ͼ
.\" .B ENOMEM
.\" ǼԤ롣
.SH Ϣ
.BR mlock (2),
.BR mmap (2)
|