Commit 30387408 authored by simonmarhaskell@gmail.com's avatar simonmarhaskell@gmail.com
Browse files

add debugging code to check for fragmentation

parent 0b43af1b
......@@ -331,6 +331,14 @@ allocGroup (nat n)
}
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment