0

I'm looking for memory debugger for Windows which will be able to debug uninitialized memory.

There is a code snippet (C++):

class Temp{
public:
 Temp(double d) : m_double(d){};

 double m_double;
 float m_float;
};

int _tmain(int argc, _TCHAR* argv[])
{
 double temp;
 std::cout << temp <<std::endl;

 Temp temp2(2.0);
 std::cout << temp2.m_double <<std::endl;
 std::cout << temp2.m_float <<std::endl;

 int num1, num2;
 num1 = num2 + 1;

 return 0;
}

Desirable features:

  • dynamic memory debugger, not static analysis tool
  • GUI
  • free
  • integration with VS2005
  • simple to use

Tried to use:

  • Rational Purify v.7.0.0.0 build:6274
  • Memory Validator v.5.12
  • cppcheck - worked fine on given snippet but didn't helped on real big project

UPD: it seems that there is no way to find uninitialized memory in release mode with optimizations turned on with dynamic memory debugger. Going to try in debug mode.

Maksim
  • 191
  • 1
  • 10
  • 2
    possible duplicate of [Is there a good Valgrind substitute for Windows?](http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows) – Flexo Sep 20 '11 at 14:55

2 Answers2

0

In the past I've used Purify for all sorts of memory issues and it works pretty well. Downside is it's $$$$.

If it's at all an option, a Linux port of the backend to use valgrind which is also a great tool.

Mark B
  • 95,107
  • 10
  • 109
  • 188
0

I think this problem is more related to static code analyzers. I saw such warnings from visual studio with maximum warning level in project settings but I'm not sure about vs2005.

You can also try to use some tools from this question about code analyzers.

Community
  • 1
  • 1
Eugene
  • 3,335
  • 3
  • 36
  • 44
  • Thanks for your comment. Actually I used cppcheck, it works fine for given snippet but didn't help on real big project, so I would prefer dynamic memory debugger, not static analysis tool. – Maksim Sep 21 '11 at 07:14