Stack size and bypassing ulimit

K

Kalaky

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top