summaryrefslogtreecommitdiff
path: root/rts/Threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Threads.c')
-rw-r--r--rts/Threads.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/Threads.c b/rts/Threads.c
index fc520c6a93..802a37c94c 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
{