Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: What perl operations will consume C stack space?

by TimToady (Parson)
on Feb 25, 2006 at 10:16 UTC ( #532754=note: print w/replies, xml ) Need Help??

in reply to What perl operations will consume C stack space?

I can think of two things. First, as mentioned above, is certain regex executions. In particular, ones that quantify a compound submatch of varying length. I believe these are still done with C recursion, though I haven't looked lately.

Second, calls into XS routines that then call back into Perl.

There are probably a few others (recursive sorts? recursive runloop switches?) but by and large part of the initial design of Perl 5 was to be as stackless as practical (in the C-stackless sense). So all of Perl's stacks are really on the heap, and nearly all of the standard opcodes leave the C stack in the same state.

  • Comment on Re: What perl operations will consume C stack space?

Replies are listed 'Best First'.
Re^2: What perl operations will consume C stack space?
by BrowserUk (Pope) on Feb 27, 2006 at 04:01 UTC

    Thankyou. This was extremely helpful.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2021-04-20 22:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found