tags:

views:

594

answers:

6

Anyone know of a good memory leak checker that supports GCC on Windows?

Unfortunately, IBM's Purify only works for GCC on Linux; and of course valgrind doesn't run on Windows.

+1  A: 

Try dmalloc, it should work on GCC on Windows as far as I know. Check out http://sourceforge.net/projects/dmalloc/

+1  A: 

valgrind does not work on windows, but you can use wine + valgrind. It works pretty well in my experience.

David Cournapeau
Thanks; I tried that, but unfortunately wine doesn't run my program properly.
beepboopbopbop
+1  A: 

I was looking for a solution to this recently. Have not been able to put time for a good working solution, this is a list of things i have seen.

  • winleak at Sourceforge
  • Valgrind with Wine

    Did not know that: Valgrind 3.4.0 supports Wine out of the box. However, to make Wine play properly with valgrind, you need to build Wine yourself after installing valgrind Also, to ignore errors not due to Wine, you will want to use the Valgrind suppressions file Dan Kegel has put together.

  • Enabling Memory leak detection in Visual Studio

    The primary tools for detecting memory leaks are the debugger and the C Run-Time Libraries (CRT) debug heap functions.

  • Microsoft MSDN reference to Windows Automative -- this may not even be related!

I have to get around checking these things (will also look at other answers on this question when I do that). Thanks for your question.

nik
+1  A: 

According to the website, AQTime also supports GCC on Windows. I never tried that though. Anyway, AQTime is in my opinion one of the very best profilers (not only memory leaks) available, so if it does what you need, go for it.

OregonGhost
A: 

http://betterlogic.com/roger/?p=1140 has a list of a few I found while googling--haven't tried any tho.

rogerdpack
A: 

Memory Validator supports gcc and g++ on Windows, with COFF and STABS symbol support.

Stephen Kellett