projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
32ca5da
)
Round stack size to a whole number of megablocks
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 28 May 2009 13:34:40 +0000
(13:34 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 28 May 2009 13:34:40 +0000
(13:34 +0000)
This is not a bug fix, it just makes better use of memory
rts/Threads.c
patch
|
blob
|
history
diff --git
a/rts/Threads.c
b/rts/Threads.c
index
501c751
..
d578cc2
100644
(file)
--- a/
rts/Threads.c
+++ b/
rts/Threads.c
@@
-84,7
+84,7
@@
createThread(Capability *cap, nat size)
size = MIN_STACK_WORDS + TSO_STRUCT_SIZEW;
}
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);
tso = (StgTSO *)allocateLocal(cap, size);
TICK_ALLOC_TSO(stack_size, 0);