Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > leak detected using valgrind

Reply
Thread Tools

leak detected using valgrind

 
 
Alexandre
Guest
Posts: n/a
 
      11-13-2003
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:6
==5336== by 0x852F863: ClassB::ClassB(ClassB const &)
(/usr/include/g++-3/stl_pair.h:6

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

Thanks
 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      11-13-2003
Alexandre wrote:
> 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:6
> ==5336== by 0x852F863: ClassB::ClassB(ClassB const &)
> (/usr/include/g++-3/stl_pair.h:6
>
> 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/groups?selm...ing.google.com

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 ...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi, How to use valgrind to detect the memory leak in sub-function? GLiang.liu.cn@gmail.com C++ 1 05-29-2008 01:14 PM
Leak or no leak ?? Richard Heathfield C Programming 4 07-10-2006 11:37 AM
valgrind/memory leak question bluekite2000@gmail.com C++ 1 04-29-2005 07:35 AM
Problems with valgrind Andreas Andersen C++ 2 01-18-2005 03:06 PM
Checking for memory leaks: valgrind versus insure++ rsina C++ 2 11-29-2004 11:04 AM



Advertisments