VM: don't end the gc event in start_gc_again, fixes #659
parent
583fb5825b
commit
8911ad2a16
|
@ -1,4 +1,5 @@
|
|||
USING: tools.test tools.memory memory arrays ;
|
||||
USING: arrays math memory namespaces parser sequences tools.memory
|
||||
tools.memory.private tools.test tools.time ;
|
||||
IN: tools.memory.tests
|
||||
|
||||
{ } [ room. ] unit-test
|
||||
|
@ -8,3 +9,9 @@ IN: tools.memory.tests
|
|||
{ } [ gc-stats. ] unit-test
|
||||
{ } [ gc-summary. ] unit-test
|
||||
{ } [ callback-room. ] unit-test
|
||||
|
||||
! Each gc-event must reclaim something. #659
|
||||
{ f } [
|
||||
[ "resource:basis/tools/memory/memory.factor" run-file ] time
|
||||
gc-events get [ space-reclaimed 0 < ] any?
|
||||
] unit-test
|
||||
|
|
|
@ -72,8 +72,6 @@ void factor_vm::end_gc() {
|
|||
}
|
||||
|
||||
void factor_vm::start_gc_again() {
|
||||
end_gc();
|
||||
|
||||
switch (current_gc->op) {
|
||||
case collect_nursery_op:
|
||||
/* Nursery collection can fail if aging does not have enough
|
||||
|
@ -92,9 +90,6 @@ void factor_vm::start_gc_again() {
|
|||
critical_error("in start_gc_again, bad GC op", current_gc->op);
|
||||
break;
|
||||
}
|
||||
|
||||
if (gc_events)
|
||||
current_gc->event = new gc_event(current_gc->op, this);
|
||||
}
|
||||
|
||||
void factor_vm::set_current_gc_op(gc_op op) {
|
||||
|
|
Loading…
Reference in New Issue