From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28480 invoked by alias); 6 May 2012 00:43:40 -0000 Received: (qmail 28471 invoked by uid 22791); 6 May 2012 00:43:39 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_XG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm17.bullet.mail.bf1.yahoo.com (HELO nm17.bullet.mail.bf1.yahoo.com) (98.139.212.176) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sun, 06 May 2012 00:43:27 +0000 Received: from [98.139.215.141] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 06 May 2012 00:43:26 -0000 Received: from [98.139.212.221] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 06 May 2012 00:43:26 -0000 Received: from [127.0.0.1] by omp1030.mail.bf1.yahoo.com with NNFMP; 06 May 2012 00:43:26 -0000 Received: (qmail 14529 invoked by uid 60001); 6 May 2012 00:43:26 -0000 Received: from [108.218.104.112] by web162404.mail.bf1.yahoo.com via HTTP; Sat, 05 May 2012 17:43:26 PDT References: <1335710405.38804.YahooMailNeo@web162403.mail.bf1.yahoo.com> <4FA22BFD.1060600@yandex.ru> Message-ID: <1336265006.12801.YahooMailNeo@web162404.mail.bf1.yahoo.com> Date: Sun, 06 May 2012 00:43:00 -0000 From: Hei Chan Reply-To: Hei Chan Subject: Re: Memory Dump To: xgsa Cc: "gdb@sourceware.org" In-Reply-To: <4FA22BFD.1060600@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00021.txt.bz2 Never used massif before. =A0Just tried it for few hours, and it doesn't se= em 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 t= ime (i.e. sleep(x)) and deallocate later to trigger a snapshot to "stamp" t= he "times". A quite useful tool tho, but I am not on 3.7.0 yet that offers pages-as-hea= p=3Dyes option; and it shows nothing too fishy to me yet :( Very appreciate your input tho. Cheers, Hei ________________________________ From: xgsa To: Hei Chan =20 Cc: "gdb@sourceware.org" =20 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=20 toolchain) could help you. P.S. However the question is still interesting - is there a possibility=20 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 me= mory 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 > >