leak detected using valgrind

A

Alexandre

Hi,
I'm currently investigating a leak in a c++ program. I've run
valgrind to detect it and valgrind give me some result like this
one...


==5336== 64064 bytes in 728 blocks are still reachable in loss record
14 of 16
==5336== at 0x40026B30: __builtin_new (vg_replace_malloc.c:172)
==5336== by 0x4028C531: AnObject::AnObject(AnObject const &)
(anobject.cpp:140)
==5336== by 0x85310EF: ClassA::ClassA(ClassA const &)
(/usr/include/g++-3/stl_pair.h:68)
==5336== by 0x852F863: ClassB::ClassB(ClassB const &)
(/usr/include/g++-3/stl_pair.h:68)

Are those still reachable block a real problem ?? Or do I need to
look elsewhere...

Thanks
 
G

Gianni Mariani

Alexandre said:
Hi,
I'm currently investigating a leak in a c++ program. I've run
valgrind to detect it and valgrind give me some result like this
one...


==5336== 64064 bytes in 728 blocks are still reachable in loss record
14 of 16
==5336== at 0x40026B30: __builtin_new (vg_replace_malloc.c:172)
==5336== by 0x4028C531: AnObject::AnObject(AnObject const &)
(anobject.cpp:140)
==5336== by 0x85310EF: ClassA::ClassA(ClassA const &)
(/usr/include/g++-3/stl_pair.h:68)
==5336== by 0x852F863: ClassB::ClassB(ClassB const &)
(/usr/include/g++-3/stl_pair.h:68)

Are those still reachable block a real problem ?? Or do I need to
look elsewhere...

Which version of GCC are you using ? Does it support GLIBCPP_FORCE_NEW ?

See this:

http://groups.google.com/[email protected]

and this:

http://vv.cs.byu.edu/cs586/archive/000186.html

I just read up that in GCC 3.4 this is now GLIBCXX_FORCE_NEW ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top