Calls to memory allocation and deallocation functions that are not properly managed can be a source of inefficient data usage and can result in poor program performance. In heap tracing, the Collector traces memory allocation and deallocation requests by interposing on the C standard library memory allocation functions malloc, realloc, valloc, and memalign and the deallocation function free. Calls to mmap are treated as memory allocations, which enables heap tracing events for Java memory allocations to be recorded. The Fortran functions allocate and deallocate call the C standard library functions, so these routines are traced indirectly.
Heap profiling for Java programs is not supported.
Heap tracing data is converted into the following metrics.
Table 2-3 Memory Allocation (Heap Tracing) Metrics
|
Collecting heap tracing data can help you identify memory leaks in your program or locate places where there is inefficient allocation of memory.
When you look at the Leaks view with filters applied, the leaks shown are for memory allocations that were done under the filtering criteria and not deallocated at any time. Leaks are not restricted to those allocations that are not deallocated under the filtering criteria.
Sometimes, as in the dbx debugging tool, a memory leak is defined as a dynamically allocated block of memory that has no pointers pointing to it anywhere in the data space of the program. The definition of leaks used here includes this alternative definition, but also includes memory for which pointers do exist.