X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FBlockAlloc.c;h=429ebd03ad453cc0a485523f7b972a913f37349d;hb=7267a7862cc406e593c89e79a4d5ab064ac40120;hp=8eaba72b723275564501f6395021363a2fd6bc1f;hpb=3fb074b5fcfd91fe0d37af83f221450ac4734908;p=ghc-hetmet.git diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c index 8eaba72..429ebd0 100644 --- a/rts/sm/BlockAlloc.c +++ b/rts/sm/BlockAlloc.c @@ -333,6 +333,7 @@ allocGroup (nat n) // only the bdescrs of the first MB are required to be initialised initGroup(bd); + IF_DEBUG(sanity,memset(bd->start, 0xaa, bd->blocks * BLOCK_SIZE)); IF_DEBUG(sanity, checkFreeListSanity()); return bd; } @@ -382,6 +383,7 @@ allocGroup (nat n) barf("allocGroup: free list corrupted"); } initGroup(bd); // initialise it + IF_DEBUG(sanity,memset(bd->start, 0xaa, bd->blocks * BLOCK_SIZE)); IF_DEBUG(sanity, checkFreeListSanity()); ASSERT(bd->blocks == n); return bd; @@ -697,6 +699,8 @@ void returnMemoryToOS(nat n /* megablocks */) } free_mblock_list = bd; + osReleaseFreeMemory(); + IF_DEBUG(gc, if (n != 0) { debugBelch("Wanted to free %d more MBlocks than are freeable\n",