Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Out of Memory

by CountOrlok (Friar)
on Mar 27, 2013 at 19:28 UTC ( #1025795=note: print w/replies, xml ) Need Help??


in reply to Re: Out of Memory
in thread Out of Memory

Correction: an array of 5 million nulls will take up about 320MB.

Replies are listed 'Best First'.
Re^3: Out of Memory
by Anonymous Monk on Mar 28, 2013 at 16:04 UTC
    5 million nulls, even if it was double byte should take up less than 10 mb of memory no? If array overhead was double that, we're still at 20 mb of memory per copy?

    What is it about the workings of this second statement that causes it to consume so much memory?

    I'd like to understand how that works if anyone happens to know.

      ($nulls) = $_ = /\0/g;

      Distilling it down a little more, this also causes the out of memory error.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025795]
help
Chatterbox?
[Discipulus]: good morning Corion and all monks!!
[Discipulus]: the whole weekend was dedicated to a marionette representation done for all the children of our family / clan and thei friend. 2+ hours divided in three acts + snack time

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-03-27 07:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (316 votes). Check out past polls.