473,698 Members | 2,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_mal loc.c:172)
==5336== by 0x4028C531: AnObject::AnObj ect(AnObject const &)
(anobject.cpp:1 40)
==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 3410
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_mal loc.c:172)
==5336== by 0x4028C531: AnObject::AnObj ect(AnObject const &)
(anobject.cpp:1 40)
==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_N EW ?

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

Jul 19 '05 #2

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

Similar topics

10
8705
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 look for uncollectable objects. I've used the next: # at the beginning of code gc.enable()
4
438
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 glance (new & delete seem to be called for all dynamically crated objects) but when I run valgrind, valgrind reports a memory leak. The problem seems to come when i start using push(). Could anyone help me with this please ? I just don't see...
4
4815
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 example: #include <deque> using namespace std;
4
2629
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 leak reports in valgrind below .thanks for your attention. void CFileChange::leak_test(const unsigned long &id, char *name, Blob
9
4206
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 starts off at a nice 4% of memory, then slowly grows up to 50% and beyond. This translates to around 2 gigs of physical memory, and that's really way more memory than this program should be taking up.
7
6602
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", "Hello"); return (0); }
20
1808
by: gNash | last post by:
Hi all, void main() { char *fp; fp=malloc(26); strcpy(fp,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"); fp='\0'; free(fp); }
1
2857
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 ==4323== at 0x4021259: malloc (in /usr/lib/valgrind/x86-linux/ vgpreload_memcheck.so) ==4323== by 0x403ADB9: icvDefaultAlloc(unsigned, void*) (cxalloc.cpp:49) ==4323== by 0x804A95F: main (liuIpm_biLinear.cpp:72)
13
4347
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 throwing a std::exception with a string object. This is the test program ============================================================================= #include <sstream> #include <iostream>
0
8600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8860
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4361
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2323
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.