One thing you could do is to read only the things you need into memory at 
     the time you need them to.  If you change the values in the hash(es), you 
     could dump it to a temporary file and load them again as needed(note kind 
     of like a swap file does).
     
     Another thing would be to make the calculations, print them to the html 
     file, and move on, delete the hash etc.
     
     As always, there may well be a better solution than the two above
     Stephen


______________________________ Reply Separator _________________________________
Subject: Huge hash ... running out of memory without warning???
Author:  <[EMAIL PROTECTED]> at Internet
Date:    6/13/2001 2:04 PM


I have just written a program that makes an array of hashes of hashes of 
hashes.  It reads all kind of information in from a bunch of files and 
then later I access the elements of this thing in a convienient way 
because it's kind of like a little database.  Anyways, I end up printing 
everything out into a very big html table.  I noticed that *sometimes* 
nothing is printed  when I say 'print this part of that array...' Thought 
it was a bug in the code, but then I ran the program on a machine with 
more memory and *now* the elements that were missing previously are 
printed, but some 'further on down the line' are not.  It seems that the 
computer is running out of memory and at some point no data really gets 
added to this monster of a list of lists...  What the heck should I do so 
that I can perform these functions, but not run into this problem of 
running out of memory?
     
Cheers,
Bryan

Reply via email to