MemPro
User Guide

Introduction
Quick Start
Setup
GUI
Toolbars
Side Panel
Output Window
Graph View
App Toolbar
Launch Dialog
Connect Dialog
Snapshot Toolbar
Snapshot
Full Snapshot
Snapshot Views
Call Tree View
Call Tree Grouping
Memory View
Functions View
Types View
Leaks View
Tools Toolbar
Subtract Snapshots
Rewind Memory
VMem View
Settings Toolbar
Symbol Paths Dialog
Settings
MemPro Unix/GCC
FAQ
PureDev Logo MemPro logo
MemPro
C++ Memory Profiler
line

Leak View

Overview:

MemPro tracks leaks in three ways:

Unreferenced Allocations

Unreferenced allocations are:

The latter type of unreferenced allocations can be detected while the application is still running. MemPro will take a snapshot of the entire process memory and scan it for pointers to allocations. Any allocations that MemPro can't find a pointer to are considered as leaked.

Suspected Leaks

MemPro analyses the allocation patterns of all callstacks. Allocations are grouped by the callstack. Simply put, if a callstack is constantly allocating memory and never freeing it then the callstack graph will look like a diagonal line (bottom left to top right). MemPro uses a set of heuristics to analyse the callstack graph to see how much it looks like a leak and then gives that callstack a score from 0 to 100, 100 being a definite leak. Callstack graphs are normalised, so only the shape of the graph should be taken into consideration.

MemPro will probably bring up some false positives, to eliminate these you can use the exclusion filters discussed below and the minimum leak score.

By default MemPro will only list the first 500 allocations. This is to keep the GUI responsive. This limit can be changed in the settings.


Leak View:


leak_view.jpg

1. Callstacks with Leaks The number of callstacks with definite leaks. Definite leaks are allocations that have not been cleaned up on exit or that are not referenced by anything else in memory.
2. Leaked Allocations The number of leaked allocations
3. Leaked Memory The amount of leaked memory
4. Suspect callstacks The number of callstacks that look like they are leaking. These are evaluated using the leak heuristics.
5. Suspected Memory Leaked Amount of leaked memory from suspected leaks.
6. Minimum Certainty Suspected leaks need to have a confidence percent greater than this value to be considered a leak.
7. Summary Here MemPro will tell you how many definite leaks you have, and how many suspected leaks you have.
8. Exclude Filter MemPro will almost certainly show some false positives in the suspect leaks. You can exclude these using this exclude filter list. Enter wildcards, any callstack that has a symbol that matches one of these wildcards will be excluded.
9. Scoring Heuristics Here you can control what heuristics MemPro uses to evaluate the callstacks for suspected leaks. It is recommended that you leave these enabled unless you fully understand how they work, otherwise you may get a lot of false positives.

Deceleration: How much the gradient slows down in the last third of the time scale (Callstacks that slow down in the memory allocations are usually not leaks).
Age distribution: How many allocations there are and how evenly spaced they are. Lots of regular allocations are more likely to be leaks.
Amount Leaked: Difference from the start and end of the timescale. If a callstack frees as much as it allocates it is not leaking.

10. Callstack of Expanded Leak All of the callstacks that MemPro thinks are leaking will be listed here. Click on the rows to expand or collapse them. The are ordered by the amount leaked for definite leaks, and then by the confidence value of suspect leaks.
11. Information about Leak

Leaked Memory: How much memory is definitely leaked (unreferenced allocations)
Leaked Allocations: How many allocations are leaked (unreferenced)
Suspect Leak Confidence: How confident MemPro is that this callstack is leaking.
Suspect Leaked Memory: The amount of suspected leaked memory
Suspect Leaked Allocations: The number of suspected leaked allocations
Gradient: How much the gradient is increasing in the last third of the time ramge.
Deceleration: How much the callstack is decelerating in the last third of the time range.
Age Distribution: How many allocations there are and how tightly packed they are.

12. Callstack Graph The graph of the callstack. The more red it is, the more it is leaking. Leaked allocations are shown as small red squares. The graph is normalised over the time range and amount of memory leaked.
© Copyright 2011 - 2013 Stewart Lynch