6 aging_collector::aging_collector(factor_vm *parent_) :
7 copying_collector<aging_space,aging_policy>(
9 &parent_->gc_stats.aging_stats,
11 aging_policy(parent_)) {}
13 void factor_vm::collect_aging()
15 /* Promote objects referenced from tenured space to tenured space, copy
16 everything else to the aging semi-space, and reset the nursery pointer. */
18 /* Change the op so that if we fail here, we proceed to a full
19 tenured collection. We are collecting to tenured space, and
20 cards were unmarked, so we can't proceed with a to_tenured
22 current_gc->op = collect_to_tenured_op;
24 to_tenured_collector collector(this);
25 collector.trace_cards(data->tenured,
27 simple_unmarker(card_mark_mask));
28 collector.cheneys_algorithm();
31 /* If collection fails here, do a to_tenured collection. */
32 current_gc->op = collect_aging_op;
34 std::swap(data->aging,data->aging_semispace);
35 reset_generation(data->aging);
37 aging_collector collector(this);
39 collector.trace_roots();
40 collector.trace_contexts();
41 collector.trace_code_heap_roots(&code->points_to_aging);
42 collector.cheneys_algorithm();
43 update_code_heap_for_minor_gc(&code->points_to_aging);
45 nursery.here = nursery.start;
46 code->points_to_nursery.clear();