Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
set heap-check reset GDB stores incremental heap growth data in an
internal file. During one session data is appended
to this file. If the session is very long, it is possible
that this file may become very large. This
command discards the data existing in the file
and creates a new data file. Once this command
is executed, the user cannot see the old data.
info heap-interval < file
name >
This command creates the report of heap growth.
The data for each interval has the start and end
time of the interval. If file name is mentioned a
detailed report is written in the file.
set heap-check leaks [on |
off]
Controls HP WDB memory leak checking.
info leaks Displays a leak report, listing information such as
the leaks, size of blocks, and number of instances.
info leaks filename Writes the complete report output containing the
leak summary as well as the details to the
specified file.
info leak leaknumber Produces detailed information on the specified
leak including the allocation call stack.
set heap-check block-size
num-bytes
Instructs HP WDB to stop the program whenever
it tries to allocate a block larger than num-bytes
in size.
set heap-check heap-size
num-size
Instructs HP WDB to stop the program whenever
it tries to increase the program heap by at least
num-bytes.
min-heap-size This option reports the heap allocations that
exceed the specified number <num> of bytes
based on the cumulative number of bytes that are
allocated at each call-site, which is inclusive of
multiple calls to malloc at a particular call site.
set heap-check watch
address
Stops the program whenever a block at a
specified address is allocated or deal- located.
set heap-check null-check
[N | random]
Force malloc to return NULL after N or random
number of invocations of malloc. Use set
heap-check random-range N and set
heap-check seed-value N to define the seed
value and range for random number calculation.
Useful for simulating out-of-memory situations.
154 HP-UX Configuration-Specific Information