Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: warning "Out of memory!"

by dasgar (Deacon)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-12-28 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls