X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FSanity.c;h=dfa98657a03879d9f1591480624a0c8295ccef07;hb=56602d12c1a46fca405a9a53a91497a9597e2397;hp=44af5926d20bba38e7801c0e0cf8c1aad70f3eda;hpb=2baf448a8bb8138c736c74ae40cafa4b09491fda;p=ghc-hetmet.git diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 44af592..dfa9865 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -26,6 +26,7 @@ #include "Apply.h" #include "Printer.h" #include "Arena.h" +#include "RetainerProfile.h" /* ----------------------------------------------------------------------------- Forward decls. @@ -472,16 +473,18 @@ checkHeap(bdescr *bd) #endif for (; bd != NULL; bd = bd->link) { - p = bd->start; - while (p < bd->free) { - nat size = checkClosure((StgClosure *)p); - /* This is the smallest size of closure that can live in the heap */ - ASSERT( size >= MIN_PAYLOAD_SIZE + sizeofW(StgHeader) ); - p += size; + if(!(bd->flags & BF_SWEPT)) { + p = bd->start; + while (p < bd->free) { + nat size = checkClosure((StgClosure *)p); + /* This is the smallest size of closure that can live in the heap */ + ASSERT( size >= MIN_PAYLOAD_SIZE + sizeofW(StgHeader) ); + p += size; - /* skip over slop */ - while (p < bd->free && - (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } + /* skip over slop */ + while (p < bd->free && + (*p < 0x1000 || !LOOKS_LIKE_INFO_PTR(*p))) { p++; } + } } } }