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

Re: Out Of Memory error at 950MB with 14GB free RAM

by Abigail-II (Bishop)
on Feb 10, 2004 at 13:53 UTC ( #327909=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Out Of Memory error at 950MB with 14GB free RAM
in thread Out Of Memory error at 950MB with 14GB free RAM

[1] is a reference. A reference in a numeric context gives you a memory address. Memory addresses are usually big. Storing an element out of range in an array will make Perl grow the array so it fits - creating undefined values to fill up the array. Storing an element using a big index will make Perl create a huge array, with all the elements taking two handfuls of bytes.

I'd say you're lucky it takes only 50Mb on your system. It dies on one system I tried it on, and it used 420 Mb on another.

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://327909]
help
Chatterbox?
NodeReaper wonders through a maze of twisty little sayings, all different

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-11-24 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (351 votes). Check out past polls.

    Notices?