6 aging_collector::aging_collector(factor_vm *myvm_) :
7 copying_collector<aging_space,aging_policy>(
9 &myvm_->gc_stats.aging_stats,
11 aging_policy(myvm_)) {}
13 void factor_vm::collect_aging()
16 /* Change the op so that if we fail here, we proceed to a full
17 tenured collection. We are collecting to tenured space, and
18 cards were unmarked, so we can't proceed with a to_tenured
20 current_gc->op = collect_to_tenured_op;
22 to_tenured_collector collector(this);
23 collector.trace_cards(data->tenured,
25 simple_unmarker(card_mark_mask));
26 collector.cheneys_algorithm();
29 /* If collection fails here, do a to_tenured collection. */
30 current_gc->op = collect_aging_op;
32 std::swap(data->aging,data->aging_semispace);
33 reset_generation(data->aging);
35 aging_collector collector(this);
37 collector.trace_roots();
38 collector.trace_contexts();
39 collector.trace_code_heap_roots(&code->points_to_aging);
40 collector.cheneys_algorithm();
41 update_code_heap_for_minor_gc(&code->points_to_aging);
43 nursery.here = nursery.start;
44 code->points_to_nursery.clear();