Re: Perl 5.10.0 Memory Usage

2010-08-04 Thread David Cantrell
On Mon, Aug 02, 2010 at 07:13:17AM -0400, Bill Birkett wrote:
 I recently upgraded from Leopard to Snow Leopard.
 
 Now, some scripts that ran nicely on Perl 5.8.9 are consuming all 
 available RAM on Perl 5.10.0, and bringing the system to its knees.
 
 The scripts I'm referring to create a series of large objects, each 
 of which should be garbage-collected when the next object is created.
 
 Apparently, Perl 5.10.0 is not picking up the trash.
 
 I know how to use Perl 5.8.9 on Snow Leopard, but I would rather use 
 the 64-bit version.

If your 5.8.9 is 32-bit and 5.10.0 is 64-bit, then you can expect data
structures to use more memory, up to twice as much in the worst case.

-- 
David Cantrell | Nth greatest programmer in the world

Hail Caesar!  Those about to vi ^[ you!


Re: Perl 5.10.0 Memory Usage

2010-08-04 Thread David Cantrell
On Mon, Aug 02, 2010 at 06:05:46PM -0400, Bill Birkett wrote:

 I found some circular references, and after removing them, garbage 
 collection worked as expected.
 
 Strange that Perl 5.8.9 destroyed the objects, but Perl 5.10.0 didn't.

Do you know if 5.10.1 does?

 Is there an easy way to troubleshoot this sort of problem, other than 
 digging through your code?

There are some modules for helping to find memory leaks.  I forget their
names, but search for leak on search.cpan.org.

-- 
David Cantrell | top google result for topless karaoke murders

Arbeit macht Alkoholiker