APM: Debugging memory leak

Evan Harris eharris at puremagic.com
Wed Jul 9 11:04:03 CDT 2003


I thought for a while I had it narrowed down to File::Copy move(), as
removing that and replacing it with a system("mv","blah","blah2") really
slowed down the memory leak.

But it didn't eliminate it, and efforts to reduce it to a simple
reproducable problem script weren't successful.

The problem is that nothing in the program whould be using much memory, as
it is pretty much entirely disk based.  The normal memory image is about
10meg and fluctuates by about 1meg while running and
parsing/translating/moving files.  Until it starts growing, for no apparent
reason.

Evan


On Wed, 9 Jul 2003, Wayne Walker wrote:

> I don't know of any memory monitoring stuff in perl, but it may be
> there.
>
> I would start by generating log output that prints a line every time you
> use significant memory.
>
> While looking at the code to see where you use significant memory you
> may find the culprit.
>
> Otherwise you may see in the log that something you thought wasn't
> called often is.
>
> On Tue, Jul 08, 2003 at 11:48:25PM -0500, Evan Harris wrote:
> >
> > Is there a way to track where memory is being used in a large
> > long-running perl program?
> >
> > I have a program that after about 6 hours has leaked about 200meg of memory,
> > and I can't figure out why.  It started doing this after an upgrade from
> > perl 5.6.1 to 5.8.
> >
> > I'd like to be able to get some sort of stats on which modules what amount
> > of the memory is being used in, so I can figure out where to start trying to
> > fix it.
> >
> > Any suggestions would be appreciated.
> >
> > Evan
> >
> > _______________________________________________
> > Austin mailing list
> > Austin at mail.pm.org
> > http://mail.pm.org/mailman/listinfo/austin
>
> --
>
> Wayne Walker
>
> www.broadq.com :)  Bringing digital video and audio to the living room
>




More information about the Austin mailing list