Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Stack size and bypassing ulimit

Reply
Thread Tools

Stack size and bypassing ulimit

 
 
Kalaky
Guest
Posts: n/a
 
      10-26-2004
Hello,

I'm embedding the ruby interpreter on a large project. I'm allocating
the interpreter
on a special (p)thread with pre-specified stack chunk. This is needed
because the
running scripts are very stack intensive and I don't want users having
to change the
stack limit every time we hit an stack overflow. So the game is: the
user can choose
a large stack-size without needing root privileges, bypassing the
system stack limit.

Unfortunately, Init_stack() uses getrlimit(RLIMIT_STACK) to set STACK_LEVEL_MAX
but getrlimit does not reflect the new stack size, so when the stack
gets higher ruby
kills it self within ruby_stack_check().

I think there should exist another function that is like Init_stack,
but for hard-setting
the stack size and stack_level. Matz, are you interested ?

TIA,

Kalaky


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
ulimit stack size and python threads Greg Lindahl Python 11 01-09-2009 08:18 AM
Set ulimit when using subprocess.Popen? Jarek Zgoda Python 3 01-28-2008 02:26 PM
ulimit on open sockets ? Maxim Veksler Python 6 04-14-2007 03:39 PM
"ulimit -s" has no effect? Maciej Kalisiak Python 16 02-12-2004 06:51 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57