Don't look at all the threads before each GC.
[ghc-hetmet.git] / rts / sm / Evac.c
index f117526..1ccc8e2 100644 (file)
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------------
  *
- * (c) The GHC Team 1998-2006
+ * (c) The GHC Team 1998-2008
  *
  * Generational garbage collector: evacuation functions
  *
@@ -16,6 +16,7 @@
 #include "MBlock.h"
 #include "Evac.h"
 #include "GC.h"
+#include "GCThread.h"
 #include "GCUtils.h"
 #include "Compact.h"
 #include "Prelude.h"
@@ -63,7 +64,7 @@ alloc_for_copy (nat size, step *stp)
      */
     to = ws->todo_free;
     if (to + size > ws->todo_lim) {
-       to = gc_alloc_todo_block(ws);
+       to = todo_block_full(size, ws);
     }
     ws->todo_free = to + size;
     ASSERT(ws->todo_free >= ws->todo_bd->free && ws->todo_free <= ws->todo_lim);
@@ -227,7 +228,7 @@ selector_chain:
         // save any space in any case, and updating with an indirection is
         // trickier in a non-collected gen: we would have to update the
         // mutable list.
-        if ((bd->gen_no > N) || (bd->flags & BF_EVACUATED)) {
+        if (bd->flags & BF_EVACUATED) {
             unchain_thunk_selectors(prev_thunk_selector, (StgClosure *)p);
             *q = (StgClosure *)p;
             return;