Well, it's taken me a week to find time to build perl on the Sun machine (damn is it slow on that machine compared to building on my linux machine!).
Anyway, upgrading from 5.00503 to 5.6.0 made the memory leak go away. I'd like to do more research, but due to how long it takes to build perl and my lack of free time: case closed. (Now I have to convince the sysadmin to upgrade).
I'd be willing to do more research if needed.
I'm having trouble with my perl process bloating to >200M and it really shouldn't be. I wrote a perl program to process large files (up to 400M each). Each file is broken up into records. Once every 10-10000 records, I hit a record in the file which signals me to output some sort of summary and undef all arrays and hashes. Nevertheless, the process sometimes exceeds 200M in runtime size, where I would expect 10M to be sufficient, 50M tops.
I checked for silly things like
$x=pick_some_big_number(); $a[$x]=0;
Also, I don't create circular references.
I'd appreciate any clues for tracking down a "memory leak" of my own doing, or statements of the form "perl's garbage collector leaks by design. So rewrite your program to restart periodically".
Thanks in advance for any help!
Michael Niv.
niv@remove-if-not-a-spammer.unagi.cis.upenn.edu
------------------------------------------------------------------------------
% perl -v
This is perl, version 5.003 with EMBED built under solaris at Nov 2 1996 11:18:11 + suidperl security patch
Copyright 1987-1996, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit.
% uname -a
SunOS dali 5.6 Generic sun4u sparc SUNW,Ultra-Enterprise
What could be the problem for this?
I will summarize.
TIA
Navi
OS is SunOS cash-bench 5.6 Generic_105181-12 sun4u sparc SUNW,Ultra-2
Join the Perlmonks Setiathome Group or just go the the link and check out our stats.
In reply to (Ovid) Re: PERL memory leak?
by Ovid
in thread PERL memory leak?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |