From: Simon Marlow Date: Fri, 29 May 2009 09:07:58 +0000 (+0000) Subject: Fix bug in previous change: allocate the correct size X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5bf014afadfaa225f949f6a33000ccd40ff1bcc1 Fix bug in previous change: allocate the correct size --- diff --git a/rts/Threads.c b/rts/Threads.c index d578cc2..0bc725c 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -84,9 +84,10 @@ createThread(Capability *cap, nat size) size = MIN_STACK_WORDS + TSO_STRUCT_SIZEW; } - stack_size = round_to_mblocks(size) - TSO_STRUCT_SIZEW; - + size = round_to_mblocks(size); tso = (StgTSO *)allocateLocal(cap, size); + + stack_size = size - TSO_STRUCT_SIZEW; TICK_ALLOC_TSO(stack_size, 0); SET_HDR(tso, &stg_TSO_info, CCS_SYSTEM);