Question

I have an application that keeps using up more and more memory as time goes by (while actively running), but there are no leaks. So I know the program isn't doing something totally wrong, which would be easy to find.

Instead I want to track allocations so I can start tracking down the issue, and on a Mac I'd use Instruments, which gives a detailed profile of what objects have been allocated, and by whom, but on Windows what would I use?

Currently I'm working with C/C++ on Windows XP, using VS2005. So any tools for this setup would be great, and hopefully tools that are free or at least provide a few weeks of trial, because it'll take a while to complete any purchase (corporate stuff) if necessary, and I have deadlines.

Thanks!

Edit: I'm using VLD, so I know the program has no Leaks, but it seems to be hogging more memory than needed, and not returning it, so I need to track allocations, not leaks.

Was it helpful?

Solution

Memory validator would be ideal for you. http://www.softwareverify.com/cpp/memory/index.html

OTHER TIPS

Glowcode is here. It has the worst user interface in the world. The internals have the stuff though, if you have the patience to struggle through the horror that is trying to get it to work right. There is a 21 day free trial. I've found it to be a lifesaver, but you really have to want to find that bug.

Visual Studio Enabling Memory Leak Detection

The primary tools for detecting memory leaks are the debugger and the CRT debug heap functions. To enable the debug heap functions, include the following statements in your program:

#define CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

http://msdn.microsoft.com/en-us/library/e5ewb1h3(VS.71).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top