steves has asked for the wisdom of the Perl Monks concerning the following question:
I recently changed about a half dozen base class packages used by most of my code. When I rolled these out I found that my process size (Solaris) was growing at a pretty good clip. When I use the old versions this does not happen.
I can't find this for the life of me. There are two self references, managed via WeakRef. I've check both of these and they are not a problem. I've also used Devel::ObjectTracker and it finds nothing. I boiled my test case down to a loop that just creates a base class instance over and over again. The reference I get with each creation is identical -- I'd expect a new one if memory wasn't being freed. There are a handful of base data structures created once and modified by a base Class attribute package. I've checked those and can find no growth in them (I checked their arrays and hashes for iterative additions that might have been causing this).
Any ideas for other leak checkers? The new code makes heavier use of AUTOLOAD and does some functional goto's within there. In one case it sets a local value as part of that, but I systematically removed each of those and saw the same growth. Are there better tools or methods some monks might suggest using here? Or are there known leak areas in Perl (I'm using 5.6.1) that I'm not aware of?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding memory leaks
by Ovid (Cardinal) on Apr 24, 2002 at 15:50 UTC | |
by steves (Curate) on Apr 24, 2002 at 17:28 UTC | |
|
Re: Finding memory leaks
by perrin (Chancellor) on Apr 24, 2002 at 18:12 UTC | |
|
Re: Finding memory leaks
by gav^ (Curate) on Apr 25, 2002 at 02:18 UTC | |
by Sweeper (Pilgrim) on Apr 25, 2002 at 05:40 UTC | |
|
Re: Finding memory leaks
by steves (Curate) on Apr 28, 2002 at 23:18 UTC |