|
|
|
|
|
Leak Checkers |
|
Valgrind Valgrind is an open-source memory debugger. It can also be used to check for use of unitialised memory. See WebDocs Valgrind for more info LeakChecker The LeakChecker package is a very simple leak checker facility developed as part of the framework to provide the first level of defense against memory leaks. It can be used to allow basic leak checking to be built into package validation. To use the checker, probes (C++ macro calls) are added to the code at each object creation and destruction. By default these macros generate nothing and so can safely be a permanent addition to the code. Activation is controlled by a preprocessor option which then generates calls to record object creation and destruction with a LeaLeakChecker object. This object can be used by validation code to query the number of objects created and the number currently active. The information can be supplied globally or for a specific class.
For more details see the
Leak Checker
chapter of the
User Manual. MemCheck MemCheck is a leak checker built into ROOT. To use it you have to link in ROOT's libNew.so which replaces the standard new and delete operators. You run your application as normal but, on exit, it dumps a log of all new and delete operations which is then analysed by the ROOT utility memprobe. This looks for leaks and runs gdb on your application, to present the results as symbolic stack dumps so that you can not only see the leaking location but also the stack of callers that produced it. The checker can also be used when running macros directly from ROOT. It checks leaks of all classes; the objects don't have to inherit from TObject.
For more details see the
MemCheck
ROOT's TObjectTable To look for any objects that inherit from TObjects which could be clogging up memory:-
Insure++ Insure++ is a commercial leak checker. We have a license to run it at FNAL. See our Tools Reviews page. We don't have much experience using it, so it's better to use one of the ones listed above. |
| Security, Privacy, Legal |
|