Huge chunks of anonymous memory

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


Hi,
 Recently did some instrumentation in the glibc-2.7
nptl code, basically related to take statistics of locking and
unlocking. So the code was in c++ and I modified the make
files and added my source files so that they can be compiled
with glibc nptl.

  Since I use the code to get statistics, I have some vectors and stuff
in the c++ code. The problem is the new library uses a lot of memory.
I have done the same thing in the libthr library in FreeBSD, and it didnt
have this problem.

  Basically, the problem is that a lot of huge chunks of anonymous memory
is being allocated, and it's not done through "mmap", because I did an "strace"
and I found out. I want to know, if there are some special compiler
options I need
to give, to prevent this anomalous behaviour, or is some problem with paging or
something.

I am on Ubuntu 8.04 x86_64
glibc-2.7
gcc-4.2.3

 Can somebody please help me, or forward me to some link ... please.

Cheers,
Vinu



More information about the Libc-help mailing list