зеркало из https://github.com/github/ruby.git
Add experimental `RUBY_SHARED_FIBER_POOL_FREE_STACKS` to control madvise.
This commit is contained in:
Родитель
56fcf98849
Коммит
311007bf40
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче