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

Table Of Contents
in _start ()
in $START$ ()
14.10.12 Memory Checking Analysis for User Defined Memory Management Routines
Many user applications have their own memory management routines. These custom
allocator routines are either user defined or sometimes wrappers to the default memory
management routines. Memory checking features has been extended for user defined
memory management routines. Memory leak, profile of heap memory or memory errors
can be obtained for user defined memory management routines.
Limitations:
This feature routes to default memory routines instead of calling user defined memory
management routines to obtain memory analysis.
This feature is not supported in batch mode and attach mode debugging.
14.10.13 Commands to track the change in data segment value
The high water mark records the number of times the brk() value changes. The following
commands are supported:
info heap high-mem Displays the number of times brk() value
changes for a given run.
set heap-check high-mem-count
X_number
Stops when brk() value has moved X_number
of times.
Limitations:
This feature assumes that an application has a deterministic memory allocation
pattern from one run to another.
The high_mem feature is not supported in batch mode debugging.
14.10.14 Support for Memory Debugging Feature on Applications Using libmallocng
Library for Heap Allocation Management
With this feature, you can perform memory debugging while using libmallocng library
instead of libc library for heap management. This enables you to identify potential
heap usage errors which might surface only when using libmallocng library for heap
management.
NOTE: Arena information cannot be obtained if the application uses libmallocng.
If you are using LD_PRELOAD to load libmallocng, then LD_PRELOAD must be
modified to load librtc library ahead of libmallocng library before memory
debugging as shown below:
For 64–bit executable
14.10 Debugging Memory Problems 175