| View previous topic :: View next topic |
| Author |
Message |
Winbatch Guest
|
Posted: Wed Feb 23, 2005 4:51 am Post subject: 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.
|
|
| Back to top |
|
 |
rajkumar@hotmail.com Guest
|
|
| Back to top |
|
 |
rajkumar@hotmail.com Guest
|
|
| Back to top |
|
 |
Winbatch Guest
|
Posted: Wed Feb 23, 2005 5:22 am Post subject: Re: Memory Leak Detection |
|
|
For Sun Solaris.
<rajkumar (AT) hotmail (DOT) com> wrote
|
|
| Back to top |
|
 |
Markus Elfring Guest
|
Posted: Wed Feb 23, 2005 8:00 pm Post subject: Re: Memory Leak Detection |
|
|
| Quote: | 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
|
|
| Back to top |
|
 |
Winbatch Guest
|
Posted: Thu Feb 24, 2005 1:11 am Post subject: Re: Memory Leak Detection |
|
|
These appear to be either for C ( to detect malloc) or java , or bad
links...
"Markus Elfring" <Markus.Elfring (AT) web (DOT) de> wrote
|
|
| Back to top |
|
 |
E. Mark Ping Guest
|
Posted: Thu Feb 24, 2005 1:33 am Post subject: Re: Memory Leak Detection |
|
|
In article <DZTSd.11318$534.1031 (AT) twister (DOT) nyc.rr.com>,
Winbatch <winbatch (AT) techie (DOT) com> wrote:
| Quote: | 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
[email]emarkp (AT) soda (DOT) CSUA.Berkeley.EDU[/email]
|
|
| Back to top |
|
 |
Winbatch Guest
|
Posted: Thu Feb 24, 2005 1:47 am Post subject: Re: Memory Leak Detection |
|
|
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" <emarkp (AT) soda (DOT) csua.berkeley.edu> wrote
| Quote: | In article <DZTSd.11318$534.1031 (AT) twister (DOT) nyc.rr.com>,
Winbatch <winbatch (AT) techie (DOT) 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
[email]emarkp (AT) soda (DOT) CSUA.Berkeley.EDU[/email]
|
|
|
| Back to top |
|
 |
E. Mark Ping Guest
|
Posted: Thu Feb 24, 2005 5:21 am Post subject: Re: Memory Leak Detection |
|
|
In article <EmaTd.11405$534.8522 (AT) twister (DOT) nyc.rr.com>,
Winbatch <winbatch (AT) techie (DOT) com> wrote:
| Quote: | 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
[email]emarkp (AT) soda (DOT) CSUA.Berkeley.EDU[/email]
|
|
| Back to top |
|
 |
Winbatch Guest
|
Posted: Thu Feb 24, 2005 12:08 pm Post subject: Re: Memory Leak Detection |
|
|
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" <emarkp (AT) soda (DOT) csua.berkeley.edu> wrote
| Quote: | In article <EmaTd.11405$534.8522 (AT) twister (DOT) nyc.rr.com>,
Winbatch <winbatch (AT) techie (DOT) 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
[email]emarkp (AT) soda (DOT) CSUA.Berkeley.EDU[/email]
|
|
|
| Back to top |
|
 |
Raymond Martineau Guest
|
Posted: Thu Feb 24, 2005 11:06 pm Post subject: Re: Memory Leak Detection |
|
|
On Wed, 23 Feb 2005 04:51:47 GMT, "Winbatch" <winbatch (AT) techie (DOT) com> wrote:
| Quote: | 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
|
|
| Back to top |
|
 |
|