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:
0b43af1
)
add debugging code to check for fragmentation
author
Simon Marlow
<simonmarhaskell@gmail.com>
Wed, 16 Apr 2008 23:30:58 +0000
(23:30 +0000)
committer
Simon Marlow
<simonmarhaskell@gmail.com>
Wed, 16 Apr 2008 23:30:58 +0000
(23:30 +0000)
rts/sm/BlockAlloc.c
patch
|
blob
|
history
diff --git
a/rts/sm/BlockAlloc.c
b/rts/sm/BlockAlloc.c
index
5bcce7b
..
98afdd4
100644
(file)
--- a/
rts/sm/BlockAlloc.c
+++ b/
rts/sm/BlockAlloc.c
@@
-331,6
+331,14
@@
allocGroup (nat n)
}
if (ln == MAX_FREE_LIST) {
}
if (ln == MAX_FREE_LIST) {
+#if 0
+ if ((mblocks_allocated * MBLOCK_SIZE_W - n_alloc_blocks * BLOCK_SIZE_W) > (1024*1024)/sizeof(W_)) {
+ debugBelch("Fragmentation, wanted %d blocks:", n);
+ RtsFlags.DebugFlags.block_alloc = 1;
+ checkFreeListSanity();
+ }
+#endif
+
bd = alloc_mega_group(1);
bd->blocks = n;
initGroup(n,bd); // we know the group will fit
bd = alloc_mega_group(1);
bd->blocks = n;
initGroup(n,bd); // we know the group will fit