diff --git a/vm/gc.cpp b/vm/gc.cpp index 53465942c8..0e9f18791a 100644 --- a/vm/gc.cpp +++ b/vm/gc.cpp @@ -64,13 +64,6 @@ gc_state::~gc_state() { } } -void factor_vm::end_gc() { - if (gc_events) { - current_gc->event->ended_gc(this); - gc_events->push_back(*current_gc->event); - } -} - void factor_vm::start_gc_again() { if (current_gc->op == collect_nursery_op) { // Nursery collection can fail if aging does not have enough @@ -160,7 +153,10 @@ void factor_vm::gc(gc_op op, cell requested_size) { } } - end_gc(); + if (gc_events) { + current_gc->event->ended_gc(this); + gc_events->push_back(*current_gc->event); + } atomic::store(¤t_gc_p, false); if (ctx) diff --git a/vm/vm.hpp b/vm/vm.hpp index 10de7ee2d6..1ff093c28d 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -338,7 +338,6 @@ struct factor_vm { void check_data_heap(); // gc - void end_gc(); void set_current_gc_op(gc_op op); void start_gc_again(); void collect_nursery();