[ale] C++ memory leak

Christopher Fowler cfowler at outpostsentinel.com
Wed Oct 11 09:51:46 EDT 2006


Is there something I can use for Perl.  I've got this program that
modules to do some of the heavy lifting.  Over time the memory usage can
go to almost 1GB.  In my part of the code I can't see anything that
would lead to a "leak".  In this case a leak being a variable where I'm
appending stuff and never deleting it.

On Wed, 2006-10-11 at 09:45 -0400, Danny Cox wrote:
> Jim,
> 
> On Wed, 2006-10-11 at 08:58 -0400, Jim wrote:
> > I have a fairly complex application that uses a number of third party 
> > class libraries, all open source.  I've got a slight memory leak.  It 
> > seems to grab about a meg a day.  I've attempted to locate the leak 
> > using a variety of methods including Electric Fence, setting the log to 
> > output almost all steps and including frequent memory checks to see what 
> > it is doing when the memory gets incremented.  I pretty much haven't 
> > found a thing.  The problem seemed to occur at random.   I converted all 
> > of my pointers to boost smart pointers and am fairly sure I'm using them 
> > legally to eliminate a missing "delete" somewhere.  
> 
> 	Have you tried valgrind?  It comes standard with many distros, and can
> reliably detect leaks.  It can tell mismatches in C++ between a new
> paired with a free, along with a malloc paired with a delete.
> 
> <snip>
> 




More information about the Ale mailing list