- // Mutable lists from each generation > N
- // we want to *scavenge* these roots, not evacuate them: they're not
- // going to move in this GC.
- // Also do them in reverse generation order, for the usual reason:
- // namely to reduce the likelihood of spurious old->new pointers.
- //
- for (g = RtsFlags.GcFlags.generations-1; g > N; g--) {
-#if defined(THREADED_RTS)
- if (n_gc_threads > 1) {
- scavenge_mutable_list(generations[g].saved_mut_list, &generations[g]);
- } else {
- scavenge_mutable_list1(generations[g].saved_mut_list, &generations[g]);
- }
-#else
- scavenge_mutable_list(generations[g].saved_mut_list, &generations[g]);
-#endif
- freeChain_sync(generations[g].saved_mut_list);
- generations[g].saved_mut_list = NULL;
-
- }
-