This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: view all the memory allocated to a process ?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: nikos chistou <paravatis92 at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 15 Nov 2009 20:35:14 +0100
- Subject: Re: view all the memory allocated to a process ?
- References: <26362209.post@talk.nabble.com>
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