From 6ef73a41982717ef8d2b9a0bdf56978f8d5eee3e Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Thu, 17 Jul 2014 23:03:23 -0400 Subject: [PATCH] reduce default stack size by 50% to 4x default from 8x --- src/thread/context.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/thread/context.hpp b/src/thread/context.hpp index 5f7f8d6..35d83d7 100644 --- a/src/thread/context.hpp +++ b/src/thread/context.hpp @@ -53,15 +53,15 @@ namespace fc { { #if BOOST_VERSION >= 105400 bco::stack_context stack_ctx; - size_t stack_size = bco::stack_allocator::default_stacksize() * 8; + size_t stack_size = bco::stack_allocator::default_stacksize() * 4; alloc.allocate(stack_ctx, stack_size); my_context = bc::make_fcontext( stack_ctx.sp, stack_ctx.size, sf); #elif BOOST_VERSION >= 105300 - size_t stack_size = bco::stack_allocator::default_stacksize(); + size_t stack_size = bco::stack_allocator::default_stacksize() * 4; void* stackptr = alloc.allocate(stack_size); my_context = bc::make_fcontext( stackptr, stack_size, sf); #else - size_t stack_size = bc::default_stacksize(); + size_t stack_size = bc::default_stacksize() * 4; my_context.fc_stack.base = alloc.allocate( stack_size ); my_context.fc_stack.limit = static_cast( my_context.fc_stack.base) - stack_size; make_fcontext( &my_context, sf ); @@ -91,13 +91,13 @@ namespace fc { delete my_context; #elif BOOST_VERSION >= 105400 if(stack_alloc) - stack_alloc->deallocate( my_context->fc_stack.sp, bco::stack_allocator::default_stacksize() ); + stack_alloc->deallocate( my_context->fc_stack.sp, bco::stack_allocator::default_stacksize() * 4 ); else delete my_context; #elif BOOST_VERSION >= 105300 if(stack_alloc) - stack_alloc->deallocate( my_context->fc_stack.sp, bco::stack_allocator::default_stacksize() ); + stack_alloc->deallocate( my_context->fc_stack.sp, bco::stack_allocator::default_stacksize() * 4); else delete my_context; #else