X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FCompact.c;h=ff7480cd57e0aa30a8d77abcfa36ff9c54414b6f;hb=163d12852002a67c5b661b4b3e7e3c5bb6faa5f3;hp=4f3dcf25258c14355397f90326f51f98f690209e;hpb=f30d527344db528618f64a25250a3be557d9f287;p=ghc-hetmet.git diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index 4f3dcf2..ff7480c 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -14,6 +14,7 @@ #include "PosixSource.h" #include "Rts.h" +#include "GCThread.h" #include "Storage.h" #include "RtsUtils.h" #include "BlockAlloc.h" @@ -935,7 +936,7 @@ update_bkwd_compact( generation *gen ) void compact(StgClosure *static_objects) { - nat g, blocks; + nat n, g, blocks; generation *gen; // 1. thread the roots @@ -953,12 +954,6 @@ compact(StgClosure *static_objects) for (g = 1; g < RtsFlags.GcFlags.generations; g++) { bdescr *bd; StgPtr p; - nat n; - for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) { - for (p = bd->start; p < bd->free; p++) { - thread((StgClosure **)p); - } - } for (n = 0; n < n_capabilities; n++) { for (bd = capabilities[n].mut_lists[g]; bd != NULL; bd = bd->link) { @@ -1006,6 +1001,10 @@ compact(StgClosure *static_objects) debugTrace(DEBUG_gc, "update_fwd: %d", g); update_fwd(gen->blocks); + for (n = 0; n < n_capabilities; n++) { + update_fwd(gc_threads[n]->gens[g].todo_bd); + update_fwd(gc_threads[n]->gens[g].part_list); + } update_fwd_large(gen->scavenged_large_objects); if (g == RtsFlags.GcFlags.generations-1 && gen->old_blocks != NULL) { debugTrace(DEBUG_gc, "update_fwd: %d (compact)", g);