Quote Originally Posted by 'Jafula',index.php?page=Thread&postID=187515#post1 87515
Something that I found invaluable when programming C/C++ back in the day was Paul Nettle's memory manager.

Best free code/tool I could use for finding those pesky memory leaks. It's something you really need to start with to save you a world of pain later on...

You can find it here; documentation in the code:

http://www.paulnettle.com/pub/FluidS...emoryManagers/
I never heard of this guy before but the source code looks impressive. When I saw the following, I laughed and was hooked! Programmer humor! I'm going to try this. I've never been happy with Visual C++'s memory leak tracking stuff. Thanks for posting this.

Code:
static		unsigned int	prefixPattern          = 0xbaadf00d; // Fill pattern for bytes preceeding allocated blocks
static		unsigned int	postfixPattern         = 0xdeadc0de; // Fill pattern for bytes following allocated blocks
static		unsigned int	unusedPattern          = 0xfeedface; // Fill pattern for freshly allocated blocks
static		unsigned int	releasedPattern        = 0xdeadbeef; // Fill pattern for deallocated blocks