Intel® Inspector Help

Finding Memory Leaks On Demand

Intel Inspector distinguishes among Memory leak, Memory not deallocated, and Memory growth problem types in the following manner:

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:

To find memory leaks on demand:

Prerequisites:

Steps:

  1. If desired, click the Reset Leak Tracking button on the Command 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.)

    CAUTION

    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 Summary 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 Summary button to check for Memory leak problems.

    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.

Tip

For more precision, consider using the GUI-based on-demand memory leak detection commands in tandem with APIs for custom memory allocation.

See Also