I need to get the following to analyze a memory leak issue. How to do that?
- Orphan Block Addresses Orphan Call
- Stack
Are there any good resources/tools to know about/fix memory leaks.
Thanks
I need to get the following to analyze a memory leak issue. How to do that?
Are there any good resources/tools to know about/fix memory leaks.
Thanks
If you're on linux, use valgrind. It's your new best friend. I'm not sure what tools are available for Windows.
Yes, as J. Paulett commented, at least on the Linux platform Valgrind is an excellent starting point.
In Windows, you can use the MiniDumpWriteDump
function in dbghelp.dll
.
http://stackoverflow.com/questions/1547211/how-to-create-minidump-for-my-process-when-it-crashes
This can be very helpful in tracking down errors in deployed applications because you can use your debug symbols to inspect a minidump made in the field with no debug info. It's not very useful for tracking memory leaks, however.
For memory leaks under Windows (aside from commercial tools like Purify, BoundsChecker and GlowCode, of course) you can use WinDbg from the free Debugging Tools for Windows package, along with Win32 heap tags to track down the source of memory leaks.
The Microsoft Application Verifier performs memory analysis similar to valgrind if you are on a Windows platform.