Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: warning "Out of memory!"

by dasgar (Curate)
on Jan 23, 2014 at 17:44 UTC ( #1071787=note: print w/ replies, xml ) Need Help??

in reply to warning "Out of memory!"

I agree with others that your posted code definitely looks like its missing quite bit.

In your code, I see lines like my @genes=<GENES>;, which kind looks like your intent is to store the contents into an array such that each element of the array corresponds to a line in the file.

Don't know if that is the source of your memory issues or not, but if that really is your intent and you want to reduce the memory being used, I would recommend checking out Tie::File. Tie::File will tie a file to an array and each line of the file becomes an element of the array. Also, Tie::File does not read the entire file into memory. It even has an option that you can set to increase/decrease the amount of memory that it "will consume at any time while managing the file".

Comment on Re: warning "Out of memory!"
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071787]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2016-05-27 06:02 GMT
Find Nodes?
    Voting Booth?