Debugging Memory Problems with MemoryScape™ : Chapter 1 Locating Memory Problems : Batch Scripting and Using the CLI : Using the dheap Command : dheap Example
dheap Example
The following example shows typical CLI information returned after MemoryScape locates an error:
d1.<> dheap
process: Enable Notify Available
1 (18993): yes yes yes
1.1 realloc: Address does not match any allocated block.: 0xbfffd87c
d1.<> dheap -info -backtrace
process 1 (18993):
0x8049e88 -- 0x8049e98 0x10 [ 16]
flags: 0x0 (none)
: realloc PC=0x400217e5 [/.../malloc_wrappers_dlopen.c]
: argz_append PC=0x401ae025 [/lib/i686/libc.so.6]
: __newlocale PC=0x4014b3c7 [/lib/i686/libc.so.6]
:
...
.../malloc_wrappers_dlopen.c]
: main PC=0x080487c4 [../realloc_prob.c]
: __libc_start_main PC=0x40140647 [/lib/i686/libc.so.6]
: _start PC=0x08048621 [/.../realloc_prob]
0x8049f18 -- 0x8049f3a 0x22 [ 34]
flags: 0x0 (none)
: realloc PC=0x400217e5 [/.../malloc_wrappers_dlopen.c]
: main PC=0x0804883e [../realloc_prob.c]
: __libc_start_main PC=0x40140647 [/lib/i686/libc.so.6]
: _start PC=0x08048621 [/.../realloc_prob]
The information displayed in this example is explained in more detail in the following sections.