mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add experimental RUBY_SHARED_FIBER_POOL_FREE_STACKS
to control madvise.
This commit is contained in:
parent
56fcf98849
commit
311007bf40
1 changed files with 5 additions and 0 deletions
5
cont.c
5
cont.c
|
@ -2337,6 +2337,11 @@ Init_Cont(void)
|
|||
|
||||
fiber_pool_initialize(&shared_fiber_pool, stack_size, FIBER_POOL_INITIAL_SIZE, vm_stack_size);
|
||||
|
||||
char * fiber_shared_fiber_pool_free_stacks = getenv("RUBY_SHARED_FIBER_POOL_FREE_STACKS");
|
||||
if (fiber_shared_fiber_pool_free_stacks) {
|
||||
shared_fiber_pool.free_stacks = atoi(fiber_shared_fiber_pool_free_stacks);
|
||||
}
|
||||
|
||||
rb_cFiber = rb_define_class("Fiber", rb_cObject);
|
||||
rb_define_alloc_func(rb_cFiber, fiber_alloc);
|
||||
rb_eFiberError = rb_define_class("FiberError", rb_eStandardError);
|
||||
|
|
Loading…
Reference in a new issue