X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGC.c;h=fb73180d0f83296c1cad4a4e73f5487950c32152;hb=c7e3cba25cbb0c50e27ca1df4ef71cf3556a492c;hp=d0dd44dd8aa0d0976a243c344330f34b955af1cb;hpb=1fb38442d3a55ac92795aa6c5ed4df82011df724;p=ghc-hetmet.git diff --git a/rts/sm/GC.c b/rts/sm/GC.c index d0dd44d..fb73180 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -408,16 +408,6 @@ GarbageCollect (rtsBool force_major_gc, // NO MORE EVACUATION AFTER THIS POINT! - // Two-space collector: free the old to-space. - // g0->old_blocks is the old nursery - // g0->blocks is to-space from the previous GC - if (RtsFlags.GcFlags.generations == 1) { - if (g0->blocks != NULL) { - freeChain(g0->blocks); - g0->blocks = NULL; - } - } - // Finally: compact or sweep the oldest generation. if (major_gc && oldest_gen->mark) { if (oldest_gen->compact) @@ -597,11 +587,6 @@ GarbageCollect (rtsBool force_major_gc, // update the max size of older generations after a major GC resize_generations(); - // Start a new pinned_object_block - for (n = 0; n < n_capabilities; n++) { - capabilities[n].pinned_object_block = NULL; - } - // Free the mark stack. if (mark_stack_top_bd != NULL) { debugTrace(DEBUG_gc, "mark stack: %d blocks", @@ -643,8 +628,12 @@ GarbageCollect (rtsBool force_major_gc, // zero the scavenged static object list if (major_gc) { nat i; - for (i = 0; i < n_gc_threads; i++) { - zero_static_object_list(gc_threads[i]->scavenged_static_objects); + if (n_gc_threads == 1) { + zero_static_object_list(gct->scavenged_static_objects); + } else { + for (i = 0; i < n_gc_threads; i++) { + zero_static_object_list(gc_threads[i]->scavenged_static_objects); + } } }