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

bucketsize: 0
buckets: 0
retirement: 0
Exec type: SHARE_MAGIC
Analyzing the info heap arenas output
The info heap arenas command displays the memory-usage statistics for the specified
arena. You can analyze the memory-usage statistics of all the arenas to determine if there
is an imbalance in memory-usage across the arenas. For example, if there are many free
blocks in an arena and these blocks are not used by threads from another arena, you
can tune the memory-usage to optimize the performance.
The info heap arenas <arena_id> blocks displays the details of all the blocks
in the given arena in an increasing order of addresses. You can analyze the size of the
blocks in the increasing order of block-addresses to detect heap-fragmentation. For
example, you can suspect heap fragmentation if two large free blocks are separated by
a small used block.
Following is a sample output of the info heap arenas command:
(gdb) info heap arenas
num_arenas: 1
expansion: 4096
Arena ID: 0
Total number of blocks in arena: 47
Start address: 0x4001003c
Ending address: 0x40480ffc
Total space: 4657088
Number of bytes in free small blocks: 69216
Number of bytes in used small blocks: 199584
Number of bytes in free ordinary blocks: 2480
Number of bytes in used ordinary blocks: 4375600
Number of bytes in holding block header: 912
Number of small blocks: 3500
Number of ordinary blocks: 9
Number of holding blocks: 35
Number of free ordinary blocks: 1
Number of free small blocks: 388
Memory-Debugging Features of WDB 23