1
0
Fork 0
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:
Samuel Williams 2019-07-16 16:35:55 +12:00
parent 56fcf98849
commit 311007bf40
No known key found for this signature in database
GPG key ID: A0765423A44728FB

5
cont.c
View file

@ -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);