Debugging Dynamic Memory Usage Errors Using HP WDB (5900-1474; WDB 6.2; January 2011)
Table 16 Commonly Used Commands for Memory Debugging (continued)
Batch ModeInteractive Mode/Attach ModeDescription
set heap-check
min-leak-size <num>
set heap-check
min-leak-size <num>
Enables you to set the minimum
block size to use for leak
detection.
Not supported in Batch Modeset heap-check watch
address
Stops program execution when the
block at the given address is
allocated or de-allocated
Not supported in Batch Modeinfo corruptionChecks for corruption in the
currently allocated heap blocks
and optionally lists the in-block
corruptions in the freed blocks.
Not supported in Batch Modeinfo danglingDisplays a list of all the dangling
pointers and dangling blocks that
are potential sources of memory
corruption.
Not supported in Batch Modeset heap-check null-check
<num>
Forces malloc() to return NULL
after <N> invocations of
malloc()
Not supported in Batch Modeset heap-check
null-check-size <size>
Forces malloc() to return NULL
after <N> bytes are allocated by
the program
Not supported in Batch Modecatch nomemEnables the user to gain control
over an out-of-memory event. The
user can step through program
execution after the nomem event
is detected.
Not supported in Batch Modeset heap-check seed-value
<num>
Defines the seed-value for random
number calculation for the set
heap-check null-check
random command
Not supported in Batch Modeset heap-check
random-range <num>
Forces malloc() to return NULL
after random number of
invocations of malloc()
Not supported in Batch Modeset heap-check resetThis command resets the data
existing in the file for incremental
profiling and creates a new data
file. The old data in the file is
erased.
76