}
static void
-init_gray_queue (void)
+init_gray_queue (gboolean use_workers)
{
- if (sgen_collection_is_concurrent ())
+ if (use_workers)
sgen_workers_init_distribute_gray_queue ();
sgen_gray_object_queue_init (&gray_queue, NULL);
}
sgen_memgov_minor_collection_start ();
- init_gray_queue ();
+ init_gray_queue (FALSE);
gc_stats.minor_gc_count ++;
sgen_nursery_alloc_prepare_for_major ();
}
- init_gray_queue ();
+ init_gray_queue (mode == COPY_OR_MARK_FROM_ROOTS_START_CONCURRENT);
TV_GETTIME (atv);
object_ops = &major_collector.major_ops_serial;
}
- /*
- * The workers have stopped so we need to finish gray queue
- * work that might result from finalization in the main GC
- * thread. Redirection must therefore be turned off.
- */
- sgen_gray_object_queue_disable_alloc_prepare (&gray_queue);
g_assert (sgen_section_gray_queue_is_empty (sgen_workers_get_distribute_section_gray_queue ()));
/* all the objects in the heap */