You may want to post this question on [EMAIL PROTECTED] I'm sure somebody
will have a good answer for you. I have been dealing with similar scripts
lately, and have even gotten 'out of memory' errors from perl on solaris
with 9 gigs of swap. Maybe there is some kind of perl module that would be
able to cache part of your data structure to /tmp or something and retrieve
parts of it when it is needed. Execution time may be slowed, but I am sure
it would help on RAM.

--Jess

-----Original Message-----
From: James Edward Gray II [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 11:08 AM
To: [EMAIL PROTECTED]
Subject: Perl Memory Management


I know Perl frees you from a lot of memory concerns, but I have come 
across a memory problem.  I have a script that reads in these very large 
text files, does calculations on the data, and spits out some output.  
On my system with ample RAM this works runs like a dream, but it's going 
to be run on a lot of different systems and I want to avoid sending the 
hard drive into page out thrashing fits when memory is tight.  I can 
easily modify the data structure to store itself in a temporary file, 
but I would prefer this only happen when needed, since it will severely 
effect an already lengthy execution time.  Is there an easy cross 
platform Perlish way to get an idea of how much RAM is still free, how 
much memory my program has eaten up, etc?  Thanks in advance for you're 
help.

James

Reply via email to