MemPro tracks leaks in three ways:
- Allocations that are not freed on exit.
- Allocations that are not referenced by anything else in the process.
- Allocation callstacks that have specific memory allocation patterns
Unreferenced allocations are:
- Any allocations that have not been freed when the app are exited
- Any allocations that are not referenced by anything else in memory
(note: To use this feature you must take a full snapshot).
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.
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.
|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).
|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)
|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.|