This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Huge chunks of anonymous memory


On 9 Jul 2008, Vinu Rajashekhar told this:

> 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

Big allocations with glibc malloc are normally satisfied via mmap().

You could try turning mmap() allocation off by setting the
MALLOC_MMAP_THRESHOLD_ environment variable to 0 before starting your
program, and looking at the maps again: if those anonymous blocks are
gone and the heap is bigger, the memory usage is attributable to
malloc(). (libstdc++'s default operator new satisfies allocation
requests through malloc().)

It's probably just an ordinary memory leak.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]