I've been using valgrind for many years and am finally stumped. After 
not having used it recently, I'm now getting "definitely lost" memory 
and the location of the "operator new" usage is a function call.

For example...

==35995== 2,089 bytes in 1 blocks are definitely lost in loss record 9 
of 10
==35995==    at 0x10008FC16: malloc (vg_replace_malloc.c:274)
==35995==    by 0x1000A126C: operator new(unsigned long) (in 
/usr/local/lib/libstdc++.6.dylib)
==35995==    by 0x10001984C: main (main.cpp:405)

where main.cpp:405 is...

     read_conf(conffile, ".conf;.test;.prot", preface, trigger_statement,
             skip_preprocessor, m4dirs, &text);

Everything being passed is a pointer.

If I don't call the routine, the error does go away.

This type of error is occurring in a variety of places, always 
"definitely lost" memory at a function call.

Anyone have any idea what I'm missing?  I've tried multiple compilers 
and a bazillion different options (on compiler and valgrind).  I'm stumped.

-- Alan

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to