summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-05-28 13:34:40 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-05-28 13:34:40 +0000
commit44ccabe68c496078d023bacc9d99720b2df19ee6 (patch)
treed4ad06d10bb79a03f12f620a0ffb21ee3123ea37 /rts
parent32ca5da8e5f380a777edf2dacc734c4b67d41f20 (diff)
downloadhaskell-44ccabe68c496078d023bacc9d99720b2df19ee6.tar.gz
Round stack size to a whole number of megablocks
This is not a bug fix, it just makes better use of memory
Diffstat (limited to 'rts')
-rw-r--r--rts/Threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Threads.c b/rts/Threads.c
index 501c7514c7..d578cc29c7 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -84,7 +84,7 @@ createThread(Capability *cap, nat size)
size = MIN_STACK_WORDS + TSO_STRUCT_SIZEW;
}
- stack_size = size - TSO_STRUCT_SIZEW;
+ stack_size = round_to_mblocks(size) - TSO_STRUCT_SIZEW;
tso = (StgTSO *)allocateLocal(cap, size);
TICK_ALLOC_TSO(stack_size, 0);