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:
e222292
)
update debugging code for fragmentation
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 25 Jan 2011 11:10:11 +0000
(11:10 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 25 Jan 2011 11:10:11 +0000
(11:10 +0000)
rts/sm/BlockAlloc.c
patch
|
blob
|
history
diff --git
a/rts/sm/BlockAlloc.c
b/rts/sm/BlockAlloc.c
index
bf0c5e6
..
0b8955c
100644
(file)
--- a/
rts/sm/BlockAlloc.c
+++ b/
rts/sm/BlockAlloc.c
@@
-345,8
+345,9
@@
allocGroup (nat n)
}
if (ln == MAX_FREE_LIST) {
}
if (ln == MAX_FREE_LIST) {
-#if 0
- if (((W_)mblocks_allocated * MBLOCK_SIZE_W - (W_)n_alloc_blocks * BLOCK_SIZE_W) > (1024*1024)/sizeof(W_)) {
+#if 0 /* useful for debugging fragmentation */
+ if ((W_)mblocks_allocated * BLOCKS_PER_MBLOCK * BLOCK_SIZE_W
+ - (W_)((n_alloc_blocks - n) * BLOCK_SIZE_W) > (2*1024*1024)/sizeof(W_)) {
debugBelch("Fragmentation, wanted %d blocks:", n);
RtsFlags.DebugFlags.block_alloc = 1;
checkFreeListSanity();
debugBelch("Fragmentation, wanted %d blocks:", n);
RtsFlags.DebugFlags.block_alloc = 1;
checkFreeListSanity();