#include "PosixSource.h"
#include "Rts.h"
+#include "GCThread.h"
#include "Storage.h"
#include "RtsUtils.h"
#include "BlockAlloc.h"
void
compact(StgClosure *static_objects)
{
- nat g, blocks;
+ nat n, g, blocks;
generation *gen;
// 1. thread the roots
for (g = 1; g < RtsFlags.GcFlags.generations; g++) {
bdescr *bd;
StgPtr p;
- nat n;
for (n = 0; n < n_capabilities; n++) {
for (bd = capabilities[n].mut_lists[g];
bd != NULL; bd = bd->link) {
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);