I have a 32 bit msvc++ application running in a production environment that is leaking memory. It basically will run for a few hours until it consumes all 3 gb of addressable memory and terminates.
I was thinking that if there was a way to suspend a process and dump it’s memory to disk, I could analyze the memory to see if there are any patterns to what it leaking.
Not sure if this is even possible. I’m just throwing science at the wall and seeing what sticks.
Some input would be much appreciated.
This is extremely straightforward as long as you’re confident that you have some means of finding something useful by analyzing the process’ heap. The tools involved are all free and instructions are here: Dump Files
That said, if you could just run a debug build for a while, the CRT will do all the work for you. See Finding Memory Leaks Using the CRT Library