473,395 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

leak detected using valgrind

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
Jul 19 '05 #1
1 3390
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: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/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 ...

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Debian User | last post by:
Hi, I'm trying to discover a memory leak on a program of mine. I've taken several approaches, but the leak still resists to appear. First of all, I've tried to use the garbage collector to...
4
by: mast2as | last post by:
Hi guys I wrote a short program to test a Tree class... I plan to use it a lot in my application so thought I would do a memory leak check before I start using it. The code seems good to me in a...
4
by: mast2as | last post by:
Hi again I was still debugging some code and check for memory leaks with valgrind and found out that valgrind finds a leak when i use deque<Somethingaqueue ?! I am compiling under Linux for...
4
by: =?gb2312?B?uqO35w==?= | last post by:
Hi i am using libMagick++.a of Magick-6.2.8 in linux.but now i encounter some leaks when reading blob into image , writting image into blob, or throwing expection .that are my code patch and...
9
by: jeungster | last post by:
Hello, I'm trying to track down a memory issue with a C++ application that I'm working on: In a nutshell, the resident memory usage of my program continues to grow as the program runs. It...
7
by: Pietro Cerutti | last post by:
Hi group, I just noticed that a malloc w/out relative free occurs in the standard C library (or at least, on my implementation of it). #include <stdio.h> int main(void) { printf("%s\n",...
20
by: gNash | last post by:
Hi all, void main() { char *fp; fp=malloc(26); strcpy(fp,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"); fp='\0'; free(fp); }
1
by: GLiang.liu.cn | last post by:
Today I use the valgrind to find the memory leak in my application. But it just gives me such information: ==4323== ==4323== 856,984 bytes in 2 blocks are indirectly lost in loss record 7 of 7...
13
by: Pep | last post by:
I have recently eradicated a lot of memory leaks in a very old C++ source set. However, whilst they were all fairly easy to resolve, I am confused by the last one. This seems to be related to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.