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

Re: Out of memory Error

by Abigail-II (Bishop)
on Aug 15, 2002 at 17:04 UTC ( #190458=note: print w/replies, xml ) Need Help??

in reply to Out of memory Error

How many lines do you have in that file? For each line, you are creating 9 strings, and an array. Each string will take 24 bytes overhead (on top of the length to the string itself). The overhead of the array is about 50 bytes, plus pointers to the strings stored, plus some because arrays always get a bit extra space allocated. That's about 120 bytes per array, making something like 336 bytes per line in the file. And that isn't counting the overhead of the hash. Or the actual content of the file.

So, if you have about 40 characters per line on average, the 670 Mb already allocated won't do....


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://190458]
[karlgoethebier]: Discipulus: Mmh, who disappeared?
[marto]: morning all
[shmem]: perl -lE '$_="odd mornin";($o=$_)=~ s/^|$/g/g;say$o'
[Eily]: Hi monks o/
[choroba]: 3 PM in Vietnam, BTW
Discipulus maybe a wrong impression..
[karlgoethebier]: Discipulus: Workshops are for weenies ;-)
[Discipulus]: here 43C high umidity, tiger mosquitos, violence in the street.. everywhere is vietnam
[karlgoethebier]: OK, i'm socially unacceptable
[karlgoethebier]: Discipulus: Were the hell are you today?

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-06-27 08:08 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (600 votes). Check out past polls.