Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: How to burn 100 megabytes in one line and still get the wrong answer

by Ven'Tatsu (Deacon)
on May 17, 2004 at 17:12 UTC ( #354035=note: print w/ replies, xml ) Need Help??


in reply to Re: How to burn 100 megabytes in one line and still get the wrong answer
in thread How to burn 100 megabytes in one line and still get the wrong answer

I belive perl will see the 'x' operator and try to allocate the necessary memory in one block. The OS will quickly not find a memory range large enough and fail the request, prompting perl to die. The alternative that would cause perl to die slowly would be if 'x' allocated a small string, copied it's first parameter into it until it ran out of space, then allocated a slightly larger sting, copied the old sting in, de-allocate the old sting, then continued to copy the first parameter until it ran out of room again. But that would be horribly inefficient. (even for perl =)


Comment on Re: Re: How to burn 100 megabytes in one line and still get the wrong answer

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://354035]
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-09-20 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls