reduce default stack size by 50% to 4x default from 8x
This commit is contained in:
parent
eed62c8338
commit
6ef73a4198
1 changed files with 5 additions and 5 deletions
|
|
@ -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<char*>( 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue