Huge chunks of anonymous memory

Vinu Rajashekhar vinutheraj@gmail.com
Wed Jul 9 21:26:00 GMT 2008


Hi,
Sorry I forgot to give some information.

Basically this anonymous memory is not part of the heap or stack
coz I used valgrind to check memory and its causing my RSS (resident set
size to go beyond 100 MB). Here is the output from pmap

Address           Kbytes     RSS    Anon  Locked Mode   Mapping
0000000000400000      44       -       -       - r-x--  test_perf
000000000060a000       4       -       -       - rw---  test_perf
000000000060b000   16640       -       -       - rw---    [ anon ]
00000000400e9000       4       -       -       - -----    [ anon ]
00000000400ea000    8192       -       -       - rw---    [ anon ]
00000000408ea000       4       -       -       - -----    [ anon ]
00000000408eb000    8192       -       -       - rw---    [ anon ]
00000000416ea000       4       -       -       - -----    [ anon ]
00000000416eb000    8192       -       -       - rw---    [ anon ]
0000000041eeb000       4       -       -       - -----    [ anon ]
0000000041eec000    8192       -       -       - rw---    [ anon ]
00000000426ec000       4       -       -       - -----    [ anon ]
00000000426ed000    8192       -       -       - rw---    [ anon ]
0000000042eed000       4       -       -       - -----    [ anon ]
0000000042eee000    8192       -       -       - rw---    [ anon ]
00000000436ee000       4       -       -       - -----    [ anon ]
00000000436ef000    8192       -       -       - rw---    [ anon ]
0000000043eef000       4       -       -       - -----    [ anon ]
0000000043ef0000    8192       -       -       - rw---    [ anon ]
00000000446f0000       4       -       -       - -----    [ anon ]
00000000446f1000    8192       -       -       - rw---    [ anon ]
0000000044ef1000       4       -       -       - -----    [ anon ]
0000000044ef2000    8192       -       -       - rw---    [ anon ]
00000000456f2000       4       -       -       - -----    [ anon ]
00000000456f3000    8192       -       -       - rw---    [ anon ]
0000000045ef3000       4       -       -       - -----    [ anon ]
0000000045ef4000    8192       -       -       - rw---    [ anon ]
00007f5b9c000000    6068       -       -       - rw---    [ anon ]
00007f5b9c5ed000   59468       -       -       - -----    [ anon ]
00007f5ba0000000    4072       -       -       - rw---    [ anon ]
00007f5ba03fa000   61464       -       -       - -----    [ anon ]
00007f5ba4000000   15256       -       -       - rw---    [ anon ]
00007f5ba4ee6000   50280       -       -       - -----    [ anon ]
00007f5ba8000000   14892       -       -       - rw---    [ anon ]
00007f5ba8e8b000   50644       -       -       - -----    [ anon ]
00007f5bac000000   15336       -       -       - rw---    [ anon ]
00007f5bacefa000   50200       -       -       - -----    [ anon ]
00007f5bb3c1b000    1540       -       -       - rw---    [ anon ]
00007f5bb3e5f000   64044       -       -       - rw---    [ anon ]
00007f5bb7cea000       8       -       -       - r-x--  libdl-2.7.so
00007f5bb7cec000    2048       -       -       - -----  libdl-2.7.so
00007f5bb7eec000       4       -       -       - r----  libdl-2.7.so
00007f5bb7eed000       4       -       -       - rw---  libdl-2.7.so
00007f5bb7eee000    1284       -       -       - r-x--  libc-2.7.so
00007f5bb802f000    2048       -       -       - -----  libc-2.7.so
00007f5bb822f000      16       -       -       - r----  libc-2.7.so
00007f5bb8233000       4       -       -       - rw---  libc-2.7.so
00007f5bb8234000      20       -       -       - rw---    [ anon ]
00007f5bb8239000      52       -       -       - r-x--  libgcc_s.so.1
00007f5bb8246000    2048       -       -       - -----  libgcc_s.so.1
00007f5bb8446000       4       -       -       - rw---  libgcc_s.so.1
00007f5bb8447000     508       -       -       - r-x--  libm-2.7.so
00007f5bb84c6000    2044       -       -       - -----  libm-2.7.so
00007f5bb86c5000       4       -       -       - r----  libm-2.7.so
00007f5bb86c6000       4       -       -       - rw---  libm-2.7.so
00007f5bb86c7000    1072       -       -       - r-x--  libstdc++.so.6.0.9
00007f5bb87d3000    2048       -       -       - -----  libstdc++.so.6.0.9
00007f5bb89d3000      28       -       -       - r----  libstdc++.so.6.0.9
00007f5bb89da000      12       -       -       - rw---  libstdc++.so.6.0.9
00007f5bb89dd000      76       -       -       - rw---    [ anon ]
00007f5bb89f0000     164       -       -       - r-x--  libpthread-2.7.so
00007f5bb8a19000    2044       -       -       - -----  libpthread-2.7.so
00007f5bb8c18000       4       -       -       - r----  libpthread-2.7.so
00007f5bb8c19000       4       -       -       - rw---  libpthread-2.7.so
00007f5bb8c1a000      16       -       -       - rw---    [ anon ]
00007f5bb8c1e000     108       -       -       - r-x--  ld-2.7.so
00007f5bb8cb1000    1556       -       -       - rw---    [ anon ]
00007f5bb8e37000       8       -       -       - rw---    [ anon ]
00007f5bb8e39000       4       -       -       - r----  ld-2.7.so
00007f5bb8e3a000       4       -       -       - rw---  ld-2.7.so
00007fffc0e25000      84       -       -       - rw---    [ stack ]
00007fffc0ffe000       8       -       -       - r-x--    [ anon ]
ffffffffff600000       4       -       -       - r-x--    [ anon ]
----------------  ------  ------  ------  ------
total kB          525648       -       -       -


The problem parts are those 50 -60 MB chunks and the thing is
if I use mtrace and muntrace before and after my code respectively, in
the app, not the library
I get memory usage of just some 10 MB but the perfomance or locks/sec goes down
from some 25000 to 2000.

Cheers,
Vinu



More information about the Libc-help mailing list