Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Use more threads.

by hv (Parson)
on Feb 27, 2006 at 11:27 UTC ( #532991=note: print w/replies, xml ) Need Help??

in reply to Use more threads.

[renodino] has been unable to find a binary edit utility for the Linux platform.

For setting stacksize, you need the API function setrlimit(2); the manpage refers you also to the bash builtin 'ulimit' and quotactl(1).

Trying that locally against an example from What perl operations will consume C stack space?:

zen% ulimit -s 8192 zen% perl -wle '$n=shift; $_="a" x $n; /(ab*)+/' 10080 Segmentation fault (core dumped) zen% ulimit -s 32768 zen% perl -wle '$n=shift; $_="a" x $n; /(ab*)+/' 10080 zen% perl -wle '$n=shift; $_="a" x $n; /(ab*)+/' 32766 zen% perl -wle '$n=shift; $_="a" x $n; /(ab*)+/' 32767 Complex regular subexpression recursion limit (32766) exceeded at -e l +ine 1. zen%
.. which gets me to the builtin limit.

Note that the limit may be capped by root, and that more complex systems may use the quota-based accounting method; but any barriers are there to stop people increasing stack size, so they shouldn't cause a problem for your requirements here.



Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://532991]
[choroba]: again a pilot?
[marto]: yeah, the whole infrastructure has changed, and video codecs have moved on a great deal
[Corion]: marto: Redoing something on new infrastructure sounds fun. At least you can reuse your previous experience :)
[marto]: I'm looking forwads to it. The video sources are dying, and they don't have the hardware to play them back (old tape formats, not just VHS + Laserdisc etc)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2017-07-28 09:15 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (425 votes). Check out past polls.