[project @ 2001-01-10 11:50:43 by rrt]
[ghc-hetmet.git] / ghc / rts / Sanity.c
index a80efb2..cf0a8fd 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Sanity.c,v 1.21 2000/04/14 15:18:06 sewardj Exp $
+ * $Id: Sanity.c,v 1.24 2000/12/11 12:37:00 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -35,6 +35,9 @@
 #include "RtsUtils.h"
 #include "BlockAlloc.h"
 #include "Sanity.h"
+#include "MBlock.h"
+#include "Storage.h"
+#include "Schedule.h"
 #include "StoragePriv.h"   // for END_OF_STATIC_LIST
 
 //@node Macros, Stack sanity, Includes
@@ -230,15 +233,6 @@ checkClosure( StgClosure* p )
 
     info = get_itbl(p);
     switch (info->type) {
-    case BCO:
-       {
-           StgBCO* bco = stgCast(StgBCO*,p);
-           nat i;
-           for(i=0; i < bco->n_ptrs; ++i) {
-               ASSERT(LOOKS_LIKE_PTR(bcoConstPtr(bco,i)));
-           }
-           return bco_sizeW(bco);
-       }
 
     case MVAR:
       { 
@@ -297,6 +291,7 @@ checkClosure( StgClosure* p )
 #endif
     case BLACKHOLE:
     case FOREIGN:
+    case BCO:
     case STABLE_NAME:
     case MUT_VAR:
     case CONSTR_INTLIKE:
@@ -498,7 +493,7 @@ checkHeap(bdescr *bd, StgPtr start)
 
        /* skip over slop */
        while (p < bd->free &&
-              (*p == 0 || !LOOKS_LIKE_GHC_INFO((void*)*p))) { p++; } 
+              (*p < 0x1000 || !LOOKS_LIKE_GHC_INFO((void*)*p))) { p++; } 
       }
       bd = bd->link;
       if (bd != NULL) {