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:
d4942f7
)
Fix an arithmetic overflow bug causing crashes with multi-GB heaps
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 24 Jun 2010 10:46:54 +0000
(10:46 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 24 Jun 2010 10:46:54 +0000
(10:46 +0000)
rts/sm/BlockAlloc.c
patch
|
blob
|
history
diff --git
a/rts/sm/BlockAlloc.c
b/rts/sm/BlockAlloc.c
index
68c3330
..
9d92c6b
100644
(file)
--- a/
rts/sm/BlockAlloc.c
+++ b/
rts/sm/BlockAlloc.c
@@
-283,7
+283,7
@@
alloc_mega_group (nat mblocks)
if (best)
{
// we take our chunk off the end here.
- nat best_mblocks = BLOCKS_TO_MBLOCKS(best->blocks);
+ StgWord best_mblocks = BLOCKS_TO_MBLOCKS(best->blocks);
bd = FIRST_BDESCR((StgWord8*)MBLOCK_ROUND_DOWN(best) +
(best_mblocks-mblocks)*MBLOCK_SIZE);