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:
78bfe2a
)
fix failing assertion
author
Simon Marlow
<simonmar@microsoft.com>
Thu, 23 Nov 2006 13:58:25 +0000
(13:58 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Thu, 23 Nov 2006 13:58:25 +0000
(13:58 +0000)
rts/sm/Storage.c
patch
|
blob
|
history
diff --git
a/rts/sm/Storage.c
b/rts/sm/Storage.c
index
31af78f
..
6af2d19
100644
(file)
--- a/
rts/sm/Storage.c
+++ b/
rts/sm/Storage.c
@@
-578,7
+578,7
@@
allocate( nat n )
nat req_blocks = (lnat)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE;
bd = allocGroup(req_blocks);
dbl_link_onto(bd, &g0s0->large_objects);
nat req_blocks = (lnat)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE;
bd = allocGroup(req_blocks);
dbl_link_onto(bd, &g0s0->large_objects);
- g0s0->n_large_blocks += req_blocks;
+ g0s0->n_large_blocks += bd->blocks; // might be larger than req_blocks
bd->gen_no = 0;
bd->step = g0s0;
bd->flags = BF_LARGE;
bd->gen_no = 0;
bd->step = g0s0;
bd->flags = BF_LARGE;
@@
-662,7
+662,7
@@
allocateLocal (Capability *cap, nat n)
ACQUIRE_SM_LOCK;
bd = allocGroup(req_blocks);
dbl_link_onto(bd, &g0s0->large_objects);
ACQUIRE_SM_LOCK;
bd = allocGroup(req_blocks);
dbl_link_onto(bd, &g0s0->large_objects);
- g0s0->n_large_blocks += req_blocks;
+ g0s0->n_large_blocks += bd->blocks; // might be larger than req_blocks
bd->gen_no = 0;
bd->step = g0s0;
bd->flags = BF_LARGE;
bd->gen_no = 0;
bd->step = g0s0;
bd->flags = BF_LARGE;