Debugging Dynamic Memory Usage Errors Using HP WDB (5900-1474; WDB 6.2; January 2011)

WDB enables you to view the following memory-usage statistics:
High level memory-usage statistics of a process
High level memory-usage statistics of each arena
Block level and overall memory-usage statistics of each arena
Block level and overall memory-usage statistics of each arena along with the allocated
stack trace for each allocated block.
NOTE: For more information on arenas, see the malloc(3c) manpages.
Table 6 lists the commands for monitoring memory-usage in an arena.
Table 6 Memory-Usage in an Arena
DescriptionCommand
Displays the high level memory-usage of a process.
Lists the number of free blocks, used blocks, small
blocks, holding blocks, node blocks and regular
blocks.
info heap process
Displays the high level memory-usage details of the
specified arena <arena_id>. It also lists the number
of free blocks, used blocks, small blocks, holding
blocks and regular blocks. If the <arena_id> is not
specified, it displays the memory-usage statistics for
the current arena.
info heap arenas <arena_id>
Displays the memory-usage statistics of all the blocks
in the given arena, in the increasing order of
block-addresses.
info heap arenas <arena_id> blocks
Displays the memory-usage statistics of a specific
block in the arena with the stack trace for the
specified arena and block.
info heap arenas <arena_id> blocks
<block-id>
Displays the overall and block level memory-usage
statistics, with stack trace wherever applicable.
info heap arena <arena_id> blocks
stacks
The info heap process and info heap arenas commands do not require
re-linking or rebuilding of the application. You can attach a running process to the
debugger and get a snapshot of the heap-profile of the process. Example 3 (page 24)
illustrates the use of the info heap process and info heap arenas commands.
Memory-Debugging Features of WDB 21