From: sewardj Date: Mon, 1 Nov 1999 18:17:45 +0000 (+0000) Subject: [project @ 1999-11-01 18:17:45 by sewardj] X-Git-Tag: Approximately_9120_patches~5619 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d8010e81db993f59af1431b098413f73a420802a;p=ghc-hetmet.git [project @ 1999-11-01 18:17:45 by sewardj] Correctly evacuate BCOs on the large object list. Was causing okeefe_neural to fail. --- diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 9c72a42..124e220 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.63 1999/10/21 08:23:56 simonmar Exp $ + * $Id: GC.c,v 1.64 1999/11/01 18:17:45 sewardj Exp $ * * (c) The GHC Team 1998-1999 * @@ -1143,7 +1143,18 @@ loop: switch (info -> type) { case BCO: - return copy(q,bco_sizeW(stgCast(StgBCO*,q)),step); + { + nat size = bco_sizeW((StgBCO*)q); + + if (size >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) { + evacuate_large((P_)q, rtsFalse); + to = q; + } else { + /* just copy the block */ + to = copy(q,size,step); + } + return to; + } case MUT_VAR: ASSERT(q->header.info != &MUT_CONS_info);