summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsewardj <unknown>1999-11-01 18:17:45 +0000
committersewardj <unknown>1999-11-01 18:17:45 +0000
commitd8010e81db993f59af1431b098413f73a420802a (patch)
tree283df23a02848d2890a133cb1c8f32907986cc40
parent30b5ebe424ebae69b162ac3fc547eb14d898535f (diff)
downloadhaskell-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.
-rw-r--r--ghc/rts/GC.c15
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);