Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/fe0a45ef706f09a6ced55b457c38c9b96f01711f >--------------------------------------------------------------- commit fe0a45ef706f09a6ced55b457c38c9b96f01711f Author: Simon Marlow <marlo...@gmail.com> Date: Wed Mar 28 11:54:08 2012 +0100 threadStackOverflow: Tweak to stack chunk sizing If the old stack is only half full, then the next chunk we allocate will be twice as large, to accommodate large requests for stack. In that case, make sure that the chunk we allocate is at least as large as the usual chunk size - there's no point allocating a 2k chunk (double the default initial chunk size of 1k) if in the normal case we would allocate a 32k chunk. >--------------------------------------------------------------- rts/Threads.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/rts/Threads.c b/rts/Threads.c index fc520c6..802a37c 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -558,7 +558,8 @@ threadStackOverflow (Capability *cap, StgTSO *tso) // if (old_stack->sp > old_stack->stack + old_stack->stack_size / 2) { - chunk_size = 2 * (old_stack->stack_size + sizeofW(StgStack)); + chunk_size = stg_max(2 * (old_stack->stack_size + sizeofW(StgStack)), + RtsFlags.GcFlags.stkChunkSize); } else { _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc