You might want to do a google for VLD (Visual Leak Detector).

 

It is an excellent free memory leak detector for MSVC 8.

 

From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Jamie Cook
Sent: 16 January 2008 01:07 AM
To: boost-users@lists.boost.org
Subject: [Boost-users] Memory Leak Detection output format

 

Hi all,

I'm using the boost.test unit tests with memory leak detection turned on and I'm slightly puzzled about the format of the output. I've been working on getting boost to play nicely with STLport and one of the 'problems' I'm having is with memory leaks being reported by boost.test which are actually coming from stlport (there is a discussion on their FAQ about how these aren't really memory leaks at all but that is beside the point). I've managed to get rid of most of these leaks but I've still got one hanging around and I don't know where it comes from. My output from my testing looks like this

Embedding manifest...
Performing Post-Build Event...
*** No errors detected
Running 1 test case...
Detected memory leaks!
Dumping objects ->
{171} normal block at 0x00378B88, 1280 bytes long.
 Data: <  7 lationStatis> A8 8D 37 00 6C 61 74 69 6F 6E 53 74 61 74 69 73
Object dump complete.

My question is this... how can I enable more informative memory leak output? In this article () it says that by #define _CRTDBG_MAP_ALLOC, the filename and line number will also be displayed. I'm looking into execution_monitor.ipp and I can see where < crtdbg.h> is included but even if I put the #define directly before this include the output comes out exactly the same as above. (and yes I recompiled the library)

I'm using MSVC8.0, boost 1.34.1 and stlport 5.1.4 and the test library is compiled as
C:\Program Files\boost\boost_1_34_1\libs\test\build>bjam --toolset=msvc link=static stdlib=stlport threading=multi

I would really appreciate if anyone could give me some insight on why this is being reported in such a way that I can't actually use it.

Cheers,
--
Jamie Cook
Research Engineer
………………………………………..…………………
Veitch Lister Consulting Pty Ltd.
Ground Floor, 80 Jephson St,
PO Box 1054,
Toowong, QLD 4066
AUSTRALIA
Ph:  +61 7 3870 4888
Fax: +61 7 3870 4446
Email: jamie.cook@veitchlister.com.au
Web: www.veitchlister.com.au
………………………………………..…………………