473,396 Members | 1,775 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,396 software developers and data experts.

Memory Leak Detection

Is there a free or shareware tool to detect memory leaks in C++ programs?
I've done a variety of google searches but either came up with commercial
products or ones I could not get to detect blatantly leaking code.
Jul 23 '05 #1
10 4517
Depends on OS

for linux you can try

http://sourceforge.net/projects/valgrind/

Jul 23 '05 #2
Depends on OS

for linux you can try

http://sourceforge.net/projects/valgrind/

Jul 23 '05 #3
For Sun Solaris.
<ra******@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Depends on OS

for linux you can try

http://sourceforge.net/projects/valgrind/

Jul 23 '05 #4
> Is there a free or shareware tool to detect memory leaks in C++ programs?

Is a software that fits to your needs listed in this article?
http://en.wikipedia.org/wiki/Memory_debugger

Regards,
Markus
Jul 23 '05 #5
These appear to be either for C ( to detect malloc) or java , or bad
links...
"Markus Elfring" <Ma************@web.de> wrote in message
news:38*************@individual.net...
Is there a free or shareware tool to detect memory leaks in C++ programs?


Is a software that fits to your needs listed in this article?
http://en.wikipedia.org/wiki/Memory_debugger

Regards,
Markus

Jul 23 '05 #6
In article <DZ******************@twister.nyc.rr.com>,
Winbatch <wi******@techie.com> wrote:
Is there a free or shareware tool to detect memory leaks in C++ programs?
I've done a variety of google searches but either came up with commercial
products or ones I could not get to detect blatantly leaking code.


The Boehm Collector is free, and can be used to detect leaks.
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
--
Mark Ping
em****@soda.CSUA.Berkeley.EDU
Jul 23 '05 #7
This also appears to be C (malloc/free) related based on this:

Using the Garbage Collector as Leak Detector
The garbage collector may be used as a leak detector. In this case, the
primary function of the collector is to report objects that were allocated
(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but are
no longer accessible
"E. Mark Ping" <em****@soda.csua.berkeley.edu> wrote in message
news:cv***********@agate.berkeley.edu...
In article <DZ******************@twister.nyc.rr.com>,
Winbatch <wi******@techie.com> wrote:
Is there a free or shareware tool to detect memory leaks in C++ programs?
I've done a variety of google searches but either came up with commercial
products or ones I could not get to detect blatantly leaking code.


The Boehm Collector is free, and can be used to detect leaks.
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
--
Mark Ping
em****@soda.CSUA.Berkeley.EDU

Jul 23 '05 #8
In article <Em******************@twister.nyc.rr.com>,
Winbatch <wi******@techie.com> wrote:
This also appears to be C (malloc/free) related based on this:

Using the Garbage Collector as Leak Detector
The garbage collector may be used as a leak detector. In this case, the
primary function of the collector is to report objects that were allocated
(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but are
no longer accessible


It's both C and C++ compatible. It's a widely known GC implementation
for C and C++. Use it or not, I really don't care.
--
Mark Ping
em****@soda.CSUA.Berkeley.EDU
Jul 23 '05 #9
All I was asking is if it would detect 'new' and 'delete' bugs and not just
malloc and free. ( I only use new and delete).
"E. Mark Ping" <em****@soda.csua.berkeley.edu> wrote in message
news:cv***********@agate.berkeley.edu...
In article <Em******************@twister.nyc.rr.com>,
Winbatch <wi******@techie.com> wrote:
This also appears to be C (malloc/free) related based on this:

Using the Garbage Collector as Leak Detector
The garbage collector may be used as a leak detector. In this case, the
primary function of the collector is to report objects that were allocated
(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but
are
no longer accessible


It's both C and C++ compatible. It's a widely known GC implementation
for C and C++. Use it or not, I really don't care.
--
Mark Ping
em****@soda.CSUA.Berkeley.EDU

Jul 23 '05 #10
On Wed, 23 Feb 2005 04:51:47 GMT, "Winbatch" <wi******@techie.com> wrote:
Is there a free or shareware tool to detect memory leaks in C++ programs?
I've done a variety of google searches but either came up with commercial
products or ones I could not get to detect blatantly leaking code.


There was an posting in clc++.moderated about a memory leak detector and
how to write one yourself (or at least adapt a detector to handle the new
and delete operators). The only problem is that it relies on macros, which
can interfere with programs using the placement new and delete operators.
http://wyw.dcweb.cn/leakage.htm

Jul 23 '05 #11

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

Similar topics

5
by: blugus | last post by:
Hi Guys, I've been try to use Dinkum STL library. It workes well first, but report memory leak in MFC Debug Mode. I use Dinkum Unabridged Library for VC++ V4.02, MSVC6, WIN2000 SERVER. I...
8
by: __jakal__ | last post by:
Hello, Is there any good memory leak detection software for C++ available as a freeware... I had used purify but had to discontinue due to huge license fees... Also tried Sun workshop memory...
6
by: Scott Niu | last post by:
Hi, I have this following simple c++ program, it will produce memory leak ( see what I did below ). My observation also showed that: There will be a mem leak when all the 3 conditions are true:...
7
by: mosaic | last post by:
Hi, all I really interested in how to check the memory leak of a program. Your smart guys, do you have excellent ideas that could share with me? Thank you. The following is my idea: In C...
0
by: Frank Lopez | last post by:
Does anyone know if Microsoft generated a whitepaper on this topic? Does anyone know what the solution is? (meaning, eliminate the leak problem -- I am seeing three memory leaks from...
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...
8
by: kk_oop | last post by:
Hi. Any recommendations for memory leak detection tools for C++ running on Linux or Solaris? I'm interested in static (compile time) and runtime detection. It's for a large project. Thanks! ...
1
by: dh | last post by:
Will GC.GetTotalMemory(true) reliably tell if a console app could have a memory leak, given the nature of memory management of GC in .NET? Like calling it two times, each at the beginning and right...
1
by: Archana | last post by:
Hi all, I am new to c++. I have written one c++ application. I want to detect memory leaks from my program. I tried with following code which i got from net. if(_CrtDumpMemoryLeaks() ==...
16
by: graham.keellings | last post by:
hi, I'm looking for an open source memory pool. It's for use on an embedded system, if that makes any difference. Something with garbage collection/defragmentation would be nice. It should have...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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,...

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.