diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-05-29 09:08:27 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-05-29 09:08:27 +0000 |
commit | b3ff8a4ed1465034aba33490af69d24a8f295c09 (patch) | |
tree | b78cb771b4c991ce2f527ecc9e036d996169b06d /rts | |
parent | 5bf014afadfaa225f949f6a33000ccd40ff1bcc1 (diff) | |
download | haskell-b3ff8a4ed1465034aba33490af69d24a8f295c09.tar.gz |
don't shrink the stack smaller than the value set by +RTS -k<size>
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Schedule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index f376286a80..66860a758b 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2442,6 +2442,8 @@ threadStackUnderflow (Task *task STG_UNUSED, StgTSO *tso) (tso_size_w - BLOCKS_PER_MBLOCK*BLOCK_SIZE_W) % MBLOCK_SIZE_W != 0 || // or TSO is not a whole number of megablocks (ensuring // precondition of splitLargeBlock() below) + (tso_size_w <= round_up_to_mblocks(RtsFlags.GcFlags.initialStkSize)) || + // or TSO is smaller than the minimum stack size (rounded up) (nat)(tso->stack + tso->stack_size - tso->sp) > tso->stack_size / 4) // or stack is using more than 1/4 of the available space { |