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

Re^5: sub calls and memory use

by dave_the_m (Monsignor)
on Nov 16, 2019 at 15:30 UTC ( #11108789=note: print w/replies, xml ) Need Help??


in reply to Re^4: sub calls and memory use
in thread sub calls and memory use

I'm pretty sure that this is not needed because you can't return to the source of a goto
Indeed, goto &foo pops the current call frame and replaces it with a new frame, rather than just pushing an additional one as a normal sub call would do. The following consumes lots of CPU but uses constant memory:
sub foo { goto &foo }; foo();

Dave.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2020-10-31 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (286 votes). Check out past polls.

    Notices?