Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Strange memory growth?

by Anonymous Monk
on Nov 07, 2003 at 23:31 UTC ( [id://305479]=note: print w/replies, xml ) Need Help??


in reply to Re: Strange memory growth?
in thread Strange memory growth?

I can't be sure, but it may have something to do with those if (1) {} blocks getting optimized away.

Replies are listed 'Best First'.
Re: Re: Re: Strange memory growth?
by hardburn (Abbot) on Nov 08, 2003 at 02:19 UTC

    It still get's put inside a block:

    $ perl -MO=Deparse -e 'if(1) { $foo = "perl" x 1000000; sleep 5; }' do { $foo = 'perl' x 1000000; sleep 5 };

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

      You're right, that was silly of me. Also, you would not get a memory growth evry 5 seconds in that case, that would just affect compile time.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (9)
As of 2024-04-19 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found