X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FGC.c;h=3d4e6872b97b27dc94b51f32a59bc0575ba3f936;hb=16acb4976514ab4b03c79d6845e3f0e98a1a33cf;hp=e0a665eb9c8eee9861798211a1b187f852be60c1;hpb=f3d40a6e45424480276d701f20b1ab4ea4278af4;p=ghc-hetmet.git diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index e0a665e..3d4e687 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.118 2001/08/08 14:14:08 simonmar Exp $ + * $Id: GC.c,v 1.121 2001/08/17 15:46:54 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -7,6 +7,7 @@ * * ---------------------------------------------------------------------------*/ +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "RtsUtils.h" @@ -847,8 +848,9 @@ GarbageCollect ( void (*get_roots)(evac_fn), rtsBool force_major_gc ) */ blocks = g0s0->n_to_blocks; - if ( blocks * RtsFlags.GcFlags.oldGenFactor * 2 > - RtsFlags.GcFlags.maxHeapSize ) { + if ( RtsFlags.GcFlags.maxHeapSize != 0 && + blocks * RtsFlags.GcFlags.oldGenFactor * 2 > + RtsFlags.GcFlags.maxHeapSize ) { long adjusted_blocks; // signed on purpose int pc_free; @@ -1338,9 +1340,10 @@ evacuate_large(StgPtr p) bdescr *bd = Bdescr(p); step *stp; - // should point to the beginning of the block - ASSERT(((W_)p & BLOCK_MASK) == 0); - + // object must be at the beginning of the block (or be a ByteArray) + ASSERT(get_itbl((StgClosure *)p)->type == ARR_WORDS || + (((W_)p & BLOCK_MASK) == 0)); + // already evacuated? if (bd->flags & BF_EVACUATED) { /* Don't forget to set the failed_to_evac flag if we didn't get