Strange Virtual Mem Mapping...
Arijit Das <[email protected]> Fri, 30 Sep 2005 04:39:21 -0700 (PDT)
| Newsgroups | gmane.linux.redhat.amd64,gmane.linux.redhat.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0721877874==
Content-Type: multipart/alternative; boundary="0-656905482-1128080361=:68173"
Content-Transfer-Encoding: 7bit
--0-656905482-1128080361=:68173
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
I have RH3.0 installed in an AMD64 machine.=20
=20
In this system, when I look at the virtual address space mappings of a pr=
ocess (say a sleep process), I see quite a few strange memory region mapp=
ings which are neither readable, nor writable/executable and all of them =
are Private (i.e. unshared). Check this:
=20
1024 ---p /lib64/tls/libc-2.3.2.so
1024 ---p /lib64/tls/libm-2.3.2.so
1024 ---p /lib64/tls/librtkaio-2.3.2.so
1024 ---p /lib64/tls/libpthread-0.60.so
=20
On the other hand, when I look at the same info in a Rh7.2 system, I don'=
t see anything like that...
=20
Question: How do I make sense of an unreadable/unwritable/unexecutable pr=
ivately mapped memory region? What is its usage? It looks like a 100% was=
tage of the process's address space. How is the process using it? Any ide=
a...anybody?
=20
You can find the sample "sleep" commands below.
=20
Thanks,
Arijit
=20
RH3.0 on AMD64:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
vgamd126:arijit>sleep 400 & =
=20
[1] 19916
vgamd126:arijit>pmap 19916
Size (KB) Perm Associated files (if any) =20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
16 r-xp /bin/sleep
4 rw-p /bin/sleep
132 rwxp =20
1108 r-xp /lib64/ld-2.3.2.so
4 rw-p /lib64/ld-2.3.2.so
4 rw-p =20
540 r-xp /lib64/tls/libm-2.3.2.so
1024 ---p /lib64/tls/libm-2.3.2.so
4 rw-p /lib64/tls/libm-2.3.2.so
4 rw-p =20
36 r-xp /lib64/tls/librtkaio-2.3.2.so
1024 ---p /lib64/tls/librtkaio-2.3.2.so
4 rw-p /lib64/tls/librtkaio-2.3.2.so
64 rw-p =20
1260 r-xp /lib64/tls/libc-2.3.2.so
1024 ---p /lib64/tls/libc-2.3.2.so
20 rw-p /lib64/tls/libc-2.3.2.so
16 rw-p =20
60 r-xp /lib64/tls/libpthread-0.60.so
1024 ---p /lib64/tls/libpthread-0.60.so
4 rw-p /lib64/tls/libpthread-0.60.so
20 rw-p =20
31396 r--p /usr/lib/locale/locale-archive
24 rw-p =20
Total Virtual Memory =3D 38816 KB
vgamd126:arijit>
=20
=20
RH7.2 in i686
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
eurika120:arijit>sleep 400 & =
=20
[1] 11065
eurika120:arijit>pmap 11065
Size (KB) Perm Associated files (if any) =20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
12 r-xp /bin/sleep
4 rw-p /bin/sleep
8 rwxp =20
88 r-xp /lib/ld-2.2.4.so
4 rw-p /lib/ld-2.2.4.so
4 r--p /usr/lib/locale/en_US/LC_IDENTIFICATION
4 r--p /usr/lib/locale/en_US/LC_MEASUREMENT
4 r--p /usr/lib/locale/en_US/LC_TELEPHONE
4 r--p /usr/lib/locale/en_US/LC_ADDRESS
4 r--p /usr/lib/locale/en_US/LC_NAME
4 r--p /usr/lib/locale/en_US/LC_PAPER
4 r--p /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
4 r--p /usr/lib/locale/en_US/LC_MONETARY
24 r--p /usr/lib/locale/en_US/LC_COLLATE
4 r--p /usr/lib/locale/en_US/LC_TIME
4 r--p /usr/lib/locale/en_US/LC_NUMERIC
4 rw-p =20
136 r-xp /lib/i686/libm-2.2.4.so
4 rw-p /lib/i686/libm-2.2.4.so
28 r-xp /lib/librt-2.2.4.so
4 rw-p /lib/librt-2.2.4.so
40 rw-p =20
1224 r-xp /lib/i686/libc-2.2.4.so
20 rw-p /lib/i686/libc-2.2.4.so
16 rw-p =20
52 r-xp /lib/i686/libpthread-0.9.so
32 rw-p /lib/i686/libpthread-0.9.so
172 r--p /usr/lib/locale/en_US/LC_CTYPE
24 rwxp =20
Total Virtual Memory =3D 1936 KB
eurika120:arijit>
=09
---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.=20
--0-656905482-1128080361=:68173
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<DIV>I have RH3.0 installed in an AMD64 machine. </DIV>
<DIV> </DIV>
<DIV>In this system, when I look at the virtual address space mappings of=
a process (say a sleep process), I see quite a few strange memory region=
mappings which are neither readable, nor writable/executable and all of =
them are Private (i.e. unshared). Check this:</DIV>
<DIV> </DIV>
<DIV> 1024 ---p &nbs=
p; /lib64/tls/libc-2.3.2.so</DIV>
<DIV> 1024 ---p &nbs=
p; /lib64/tls/libm-2.3.2.so</DIV>
<DIV> 1024 ---p &nbs=
p; /lib64/tls/librtkaio-2.3.2.so</DIV>
<DIV> 1024 ---p &nbs=
p; /lib64/tls/libpthread-0.60.so</DIV>
<DIV> </DIV>
<DIV>On the other hand, when I look at the same info in a Rh7.2 system, I=
don't see anything like that...</DIV>
<DIV> </DIV>
<DIV>Question: How do I make sense of an unreadable/unwritable/unexe=
cutable privately mapped memory region? What is its usage? It looks =
like a 100% wastage of the process's address space. How is the process us=
ing it? Any idea...anybody?</DIV>
<DIV> </DIV>
<DIV>You can find the sample "sleep" commands below.</DIV>
<DIV> </DIV>
<DIV>Thanks,<BR>Arijit</DIV>
<DIV> </DIV>
<DIV>RH3.0 on AMD64:</DIV>
<DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</DIV>
<DIV>vgamd126:arijit>sleep 400 & &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; <BR>[1] 19916</DIV>
<DIV>vgamd126:arijit>pmap 19916<BR> Size (KB) P=
erm Associated files (if any) &n=
bsp; &nb=
sp; <BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=
=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D<BR> 16 =
r-xp /bin/sleep<BR>  =
; 4 rw-p /bin/sleep=
<BR> 132 rwxp =
<BR> 1108 r-=
xp /lib64/ld-2.3.2.so<BR> =
4 rw-p /lib64/ld-2=
.3.2.so<BR> 4 =
rw-p <BR>
540 r-xp /lib64/tls/libm-2.3.2.so<BR=
> 1024 ---p &n=
bsp; /lib64/tls/libm-2.3.2.so<BR> &nbs=
p; 4 rw-p /lib64/tls/libm-2.3.2=
.so<BR> 4 &nbs=
p; rw-p <BR> =
36 r-xp /lib64/tls/librtkaio-2.3.2.so=
<BR> 1024 ---p  =
; /lib64/tls/librtkaio-2.3.2.so<BR> &n=
bsp; 4 rw-p /lib64/tls/li=
brtkaio-2.3.2.so<BR> 64 &n=
bsp; rw-p <BR> 1260=
r-xp /lib64/tls/libc-2.3.2.so<BR>&nb=
sp;
1024 ---p /lib64/tls/libc-2.3.2.so<B=
R> 20 rw-p&nb=
sp; /lib64/tls/libc-2.3.2.so<BR>  =
; 16 rw-p <BR>  =
; 60 r-xp &nbs=
p; /lib64/tls/libpthread-0.60.so<BR> 1024&n=
bsp; ---p /lib64/tls/libpthread-0.60.so<BR>=
4 rw-p=
/lib64/tls/libpthread-0.60.so<BR> &nb=
sp; 20 rw-p <BR>&nb=
sp; 31396 r--p /usr=
/lib/locale/locale-archive<BR> =
24 rw-p </DIV>
<DIV>Total Virtual Memory =3D 38816 KB<BR>vgamd126:arijit></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>RH7.2 in i686</DIV>
<DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</DIV>
<DIV>eurika120:arijit>sleep 400 & &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p; <BR>[1] 11065</DIV>
<DIV>eurika120:arijit>pmap 11065<BR> Size (KB) =
Perm Associated files (if any) &=
nbsp; &n=
bsp; <BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=
=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D<BR> 12 &nb=
sp; r-xp /bin/sleep<BR> &n=
bsp; 4 rw-p /bin/sl=
eep<BR> 8 &nbs=
p; rwxp <BR> =
88 r-xp /lib/ld-2.2.4.so<BR> &nb=
sp; 4 rw-p &nb=
sp; /lib/ld-2.2.4.so<BR> &=
nbsp; 4 r--p
/usr/lib/locale/en_US/LC_IDENTIFICATION<BR>  =
; 4 r--p /usr/lib/l=
ocale/en_US/LC_MEASUREMENT<BR> &=
nbsp; 4 r--p /usr/lib/locale/en_US/LC=
_TELEPHONE<BR> 4 &nb=
sp; r--p /usr/lib/locale/en_US/LC_ADDRESS<BR>&nbs=
p; 4 r--p&nbs=
p; /usr/lib/locale/en_US/LC_NAME<BR> &=
nbsp; 4 r--p /usr/l=
ib/locale/en_US/LC_PAPER<BR> &nb=
sp; 4 r--p /usr/lib/locale/en_US/LC_M=
ESSAGES/SYS_LC_MESSAGES<BR> &nbs=
p; 4 r--p
/usr/lib/locale/en_US/LC_MONETARY<BR>  =
; 24 r--p /usr/lib/locale/en_US=
/LC_COLLATE<BR> 4 &n=
bsp; r--p /usr/lib/locale/en_US/LC_TIME<BR> =
4 r--p =
/usr/lib/locale/en_US/LC_NUMERIC<BR> =
4 rw-p <BR>&=
nbsp; 136 r-xp  =
; /lib/i686/libm-2.2.4.so<BR> &n=
bsp; 4 rw-p /lib/i686/libm-2.2.=
4.so<BR> 28 r=
-xp /lib/librt-2.2.4.so<BR> &nbs=
p; 4 rw-p
/lib/librt-2.2.4.so<BR> 40&nbs=
p; rw-p <BR> =
1224 r-xp /lib/i686/libc-2.2.4.so<BR>=
20 rw-p =
; /lib/i686/libc-2.2.4.so<BR> &n=
bsp; 16 rw-p <BR> &n=
bsp; 52 r-xp =
/lib/i686/libpthread-0.9.so<BR> =
32 rw-p /lib/i686/libpthread-0.9.so<=
BR> 172 r--p &=
nbsp; /usr/lib/locale/en_US/LC_CTYPE<BR> &nb=
sp; 24 rwxp </DIV>
<DIV>Total Virtual Memory =3D 1936 KB<BR>eurika120:arijit></DIV><p>
<hr size=3D1>Yahoo! for Good<br>=20
<a href=3D"http://store.yahoo.com/redcross-donate3/">Click here to donate=
</a> to the Hurricane Katrina relief effort.=20
--0-656905482-1128080361=:68173--
--===============0721877874==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline