diff options
| author | sewardj <unknown> | 1999-11-01 18:17:45 +0000 |
|---|---|---|
| committer | sewardj <unknown> | 1999-11-01 18:17:45 +0000 |
| commit | d8010e81db993f59af1431b098413f73a420802a (patch) | |
| tree | 283df23a02848d2890a133cb1c8f32907986cc40 /ghc | |
| parent | 30b5ebe424ebae69b162ac3fc547eb14d898535f (diff) | |
| download | haskell-d8010e81db993f59af1431b098413f73a420802a.tar.gz | |
[project @ 1999-11-01 18:17:45 by sewardj]
Correctly evacuate BCOs on the large object list. Was causing
okeefe_neural to fail.
Diffstat (limited to 'ghc')
| -rw-r--r-- | ghc/rts/GC.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 9c72a424b4..124e22001c 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); |
