summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-05-29 09:07:58 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-05-29 09:07:58 +0000
commit5bf014afadfaa225f949f6a33000ccd40ff1bcc1 (patch)
tree901a750398fc1a536627e556cf5513664c94a457 /rts
parentdc249f10a67581f78cc30eabdfd241cd1f771232 (diff)
downloadhaskell-5bf014afadfaa225f949f6a33000ccd40ff1bcc1.tar.gz
Fix bug in previous change: allocate the correct size
Diffstat (limited to 'rts')
-rw-r--r--rts/Threads.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/Threads.c b/rts/Threads.c
index d578cc29c7..0bc725c942 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);