User Guide

  • 2020
  • 09/09/2020
  • Public Content

Finding Memory Leaks On Demand

Intel Inspector
distinguishes among
Memory leak
Memory not deallocated
, and
Memory growth
problem types in the following manner:
  • Memory leak
    problems occur when a block of memory is allocated, never deallocated, and not reachable (there is no pointer available to deallocate the block). Severity level = Error severity icon (
  • Memory not deallocated
    problems occur when a block of memory is allocated, never deallocated, but still reachable at application exit (there is a pointer available to deallocate the block). Severity level = Warning severity icon (
  • Memory growth
    problems occur when a block of memory is allocated, but not deallocated, within a specific time segment during application execution. Severity level = Warning severity icon (
Intel Inspector
customarily displays memory leaks at the end of an analysis run when an application exits; however, you can also use the
Intel Inspector
on-demand memory leak detection feature to gather memory leak information while an application is running. This is useful if:
  • An application does not terminate (such as a server process).
  • You want memory leak information, but you do not want to wait for an application to terminate.
  • You want to determine if memory is leaked during a specific interval of application execution, or during a specific user action.
  • You want to discard information about allocations performed during initialization as a way of filtering out allocations that are not currently of interest.
To find memory leaks on demand:
  • Select the
    Enable on-demand leak detection
    checkbox when configuring a memory error analysis.
  • Run the memory error analysis.
  1. If desired, click the
    Reset Leak Tracking
    button on the
    toolbar to mark the start point of the time period during which you want to find memory leaks. (The default start point is the application start.)
    When you click this button, the
    Intel Inspector
    discards earlier allocation data and tracks leaks only in new allocations. Any new memory leaks on memory allocated prior to the button click do not appear in the result.
  2. When desired, click the
    Find Leaks
    button to find memory leaks in the current allocation set.
    Outcome: The
    Intel Inspector
    generates a
    Memory leak
    problem in the
    window for any memory leak detected during the time period.
  3. Do one or more of the following:
    To Do This
    Do This
    Review the detected memory leaks.
    Click the
    button to check for
    Memory leak
    Continue finding memory leaks in the current allocation set.
    Repeat step 2.
    Discard earlier allocation data and search for memory leaks only in new allocations.
    Repeat steps 1 and 2.
  4. When you are finished, exit the application to end analysis, or simply let the analysis finish.
    Outcome: The
    Intel Inspector
    finalizes and displays the result.
For more precision, consider using the GUI-based on-demand memory leak detection commands in tandem with APIs for custom memory allocation.

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804