Stack size and bypassing ulimit
I'm embedding the ruby interpreter on a large project. I'm allocating
on a special (p)thread with pre-specified stack chunk. This is needed
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 ?
|All times are GMT. The time now is 11:57 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.