From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16892 invoked by alias); 15 Nov 2009 19:36:28 -0000 Received: (qmail 16861 invoked by uid 22791); 15 Nov 2009 19:36:26 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 15 Nov 2009 19:35:19 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAFJZHOK002973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 15 Nov 2009 14:35:17 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAFJZFdV015675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 15 Nov 2009 14:35:17 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id nAFJZExK002665; Sun, 15 Nov 2009 20:35:14 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id nAFJZErx002664; Sun, 15 Nov 2009 20:35:14 +0100 Date: Mon, 16 Nov 2009 10:17:00 -0000 From: Jan Kratochvil To: nikos chistou Cc: gdb@sourceware.org Subject: Re: view all the memory allocated to a process ? Message-ID: <20091115193514.GA2447@host0.dyn.jankratochvil.net> References: <26362209.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26362209.post@talk.nabble.com> User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2009-11/txt/msg00151.txt.bz2 On Sun, 15 Nov 2009 20:12:12 +0100, nikos chistou wrote: > I want to know if there is a way to view all the memory allocated to > a process (the regions or the offsets and their protection) this is offtopic for gdb. And the standard glibc memory allocator does not provide allocated memory introspection as it would reduce its performance. You need to change the default allocator, you track the memory easily yourself: info '(libc)Hooks for Malloc' using some small .so loaded by: (gdb) set env LD_PRELOAD=./myhook.so Or rather check some tools like valgrind which may provide such functionality out of the box (I do not know myself). Regards, Jan