From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27747 invoked by alias); 3 May 2012 14:17:25 -0000 Received: (qmail 27738 invoked by uid 22791); 3 May 2012 14:17:24 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RDNS_NONE X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 03 May 2012 14:17:10 +0000 Received: (qmail 22630 invoked by uid 0); 3 May 2012 14:17:02 -0000 Received: from 69.17.187.14 by www024.gmx.net with HTTP; Thu, 03 May 2012 16:17:01 +0200 (CEST) Cc: gdb@sourceware.org Content-Type: text/plain; charset="utf-8" Date: Thu, 03 May 2012 14:17:00 -0000 From: "Aurelian Melinte" In-Reply-To: <4FA22BFD.1060600@yandex.ru> Message-ID: <20120503141701.57320@gmx.net> MIME-Version: 1.0 References: <1335710405.38804.YahooMailNeo@web162403.mail.bf1.yahoo.com> <4FA22BFD.1060600@yandex.ru> Subject: Re: Memory Dump To: xgsa , structurechart@yahoo.com Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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/msg00009.txt.bz2 > 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? The only way I know is to write an interposition library to hook malloc()/memalign()/realloc()/free()/mmap()/munmap()/sbrk() and maybe more. An easier alternative might be mcheck() - depending what exactly you are looking for. Otherwise, wrap malloc() and friends within your own functions (xmalloc()) and use only these inside your program, etc. Regards, a. > > 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 > > > > > > -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a