Memory Leak tools for Windows-7 (64-bit) & VC++ 2008 ???
-
wrote on 16 Feb 2012, 16:04 last edited by
This CRTdbg stuff finds some memory leaks, but not all. But it's a good starting point :-)
Me personally, I use Purify on windows, or FindLeak, which are both commercial tools. -
wrote on 16 Feb 2012, 16:10 last edited by
[quote author="Gerolf" date="1329408246"]This CRTdbg stuff finds some memory leaks, but not all.[/quote]
I would be curious if you know of an example where the crtdbg fails.
-
wrote on 16 Feb 2012, 16:17 last edited by
Thanks guys... I hadn't heard of FindLeak yet... I'll have a look at that!
-
wrote on 16 Feb 2012, 16:34 last edited by
[quote author="steno" date="1329408638"]
[quote author="Gerolf" date="1329408246"]This CRTdbg stuff finds some memory leaks, but not all.[/quote]I would be curious if you know of an example where the crtdbg fails.[/quote]
Try to find COM memory leaks with CRTdbg, as it is not allocated by the msvcrt dll, it's in the kernel ;-).
So stuff like new is typically found, that's correct. -
wrote on 16 Feb 2012, 23:17 last edited by
A list of such tools is on the "Tools for Profiling and Memory Checking":/wiki/Profiling-and-Memory-Checking-Tools page in the wiki.
-
wrote on 16 Feb 2012, 23:33 last edited by
Volker, thanks for that. I didn't know that was there.
I found out through my searches that the PurifyPlus suite of tools is supposed to finally support Windows-7, so I am going through the motions of doing an eval...
Has anybody else had any experience with this stuff on Windows-7 (64-bit, but 32-bit applications), Visual Studio-2008 and with or without QT??? Any feedback positive or negative would be welcome.
-
wrote on 12 Mar 2012, 23:27 last edited by
scumpyt,
Recently we had problem here to detect leak memory in a big project.
We use WinDbg only.
- Running gflags.exe to instruct mscrt to "Create user mode stack trace database":
@gflags.exe /i <exe> +ust@
-
Run the application and attach to EXE or
-
Creating a memory dump during the execution of application
With the dump file, you can check the heap, searching for leaks (busy memory)
WinDbg has many commands, but we use basically these:
!heap -s
(to summarise the heap allocation table)
!heap -stat -h <heap handle>
( show usage stats of handle - show by allocation size)
!heap -flt s <size>
(filter to show the allocations of size especified)
!heap -p -a <addr>
(shows details of allocation - with stacktrace)Note: you need the PDB files to WinDbg get the correct symbol information about youe application.
You can take information about WinDbg:
http://windbg.org/ (check the symbol server settings in page)
http://windbg.info/doc/1-common-cmds.html (check item 20)You can use the new SDK from Microsoft (Windows 8 Consumer Preview) to install WinDbg. It has less bugs (http://msdn.microsoft.com/en-us/windows/hardware/gg463009)
The interface of WinDbg is weird. But it help me a lot.
-
wrote on 15 Apr 2012, 15:49 last edited by
If you want some good tools for e.g memory leak checking, performance profiling, code coverage checking, thread checking etc. on Windows, look no further than:
I have no connection to these guys, just a happy customer for several years now. The thing I like about them is:
- you don't have to make ANY changes to your code to use them.
- they present the results graphically in an intelligent way, something that cannot ever be said for e.g. valgrind.
- they are relatively inexpensive.
- if you get a problem their developers are quick to respond.
- they work. Need I say more?
-
wrote on 23 Oct 2012, 12:59 last edited by
Valgrind has no competitors!
Hi! I have a similar question. Guru advised many different debuggers. A few of them are really effective. But most of them do not do their job well. Now my work computer was installed deleaker, Not a bad debugger, but the program is paid :( This is a minus -
wrote on 23 Oct 2012, 13:24 last edited by
Sorry for erasing my previous comment. I just made a small mistake. Hope i will not continue it again.
-
wrote on 23 Oct 2012, 15:07 last edited by
Riz, can you tell us where you find the Valgrind tool for Windows? Is it the in-development version from
http://sourceforge.net/projects/valgrind4win/
or somewhere else. If it IS this sourceforge version, how stable is it?Thanks in advance...
-
wrote on 24 Oct 2012, 07:09 last edited by
You have to use "Wine and Valgrind.":http://wiki.winehq.org/Wine_and_Valgrind . Check this Link for more updates...
-
wrote on 24 Oct 2012, 07:10 last edited by
This can also be Useful "Good Valgrind Substitute for Windows":http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows
-
wrote on 24 Oct 2012, 13:19 last edited by
I have heard about wine! It seems that this is not a bad tool!
-
wrote on 9 Nov 2012, 11:24 last edited by
Maybe you can test the code on a virtual Linux machine inside your Windows, just when you need to check it. you can share the development folder between the virtual and non-virtual machine. that is, if the code is portable enough. – Liran Orevi (by Riz reference) How can this be done? I also work on Linux and Windows.