This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Memory Dump
- From: Hei Chan <structurechart at yahoo dot com>
- To: xgsa <xgsa at yandex dot ru>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Sat, 5 May 2012 17:43:26 -0700 (PDT)
- Subject: Re: Memory Dump
- References: <1335710405.38804.YahooMailNeo@web162403.mail.bf1.yahoo.com> <4FA22BFD.1060600@yandex.ru>
- Reply-to: Hei Chan <structurechart at yahoo dot com>
Never used massif before. ?Just tried it for few hours, and it doesn't seem like to be able to take snapshot when a user requests for/signals to.
I had to instrument my code to malloc big chunk of memory in a predefined time (i.e. sleep(x)) and deallocate later to trigger a snapshot to "stamp" the "times".
A quite useful tool tho, but I am not on 3.7.0 yet that offers pages-as-heap=yes option; and it shows nothing too fishy to me yet :(
Very appreciate your input tho.
Cheers,
Hei
________________________________
From: xgsa <xgsa@yandex.ru>
To: Hei Chan <structurechart@yahoo.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Sent: Wednesday, May 2, 2012 11:55 PM
Subject: Re: Memory Dump
Hi,
I am not sure, but it seems massif (the tool from the valgrind
toolchain) could help you.
P.S. However the question is still interesting - is there a possibility
to solve the problem with gdb? Could someone answer it?
Anton.
-------- Original message --------
>
> Hi,
>
> I wonder whether it is possible to dump all the objects created in the memory at the moment with GDB (I am on v7.0.1).
>
> What I am trying to achieve is to identify which types of objects take up most of the memory at the moment.
>
> Valgrind doesn't catch it and so I believe that it is some logical bug in my code that keeps creating the objects and free all of them at the end (i.e. program terminated).
>
> Thanks in advance.
>
>
> Cheers,
> Hei
>
>