vm: remove old_data_heap from gc_state
parent
61e1854ca5
commit
1fc48b8894
|
@ -95,13 +95,15 @@ void full_collector::cheneys_algorithm()
|
||||||
|
|
||||||
void factor_vm::collect_full(cell requested_bytes, bool trace_contexts_p)
|
void factor_vm::collect_full(cell requested_bytes, bool trace_contexts_p)
|
||||||
{
|
{
|
||||||
|
data_heap *old;
|
||||||
if(current_gc->growing_data_heap)
|
if(current_gc->growing_data_heap)
|
||||||
{
|
{
|
||||||
current_gc->old_data_heap = data;
|
old = data;
|
||||||
set_data_heap(grow_data_heap(current_gc->old_data_heap,requested_bytes));
|
set_data_heap(grow_data_heap(data,requested_bytes));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
old = NULL;
|
||||||
std::swap(data->tenured,data->tenured_semispace);
|
std::swap(data->tenured,data->tenured_semispace);
|
||||||
reset_generation(data->tenured);
|
reset_generation(data->tenured);
|
||||||
}
|
}
|
||||||
|
@ -121,8 +123,7 @@ void factor_vm::collect_full(cell requested_bytes, bool trace_contexts_p)
|
||||||
reset_generation(data->aging);
|
reset_generation(data->aging);
|
||||||
nursery.here = nursery.start;
|
nursery.here = nursery.start;
|
||||||
|
|
||||||
if(current_gc->growing_data_heap)
|
if(old) delete old;
|
||||||
delete current_gc->old_data_heap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ struct gc_state {
|
||||||
|
|
||||||
/* sometimes we grow the heap */
|
/* sometimes we grow the heap */
|
||||||
bool growing_data_heap;
|
bool growing_data_heap;
|
||||||
data_heap *old_data_heap;
|
|
||||||
|
|
||||||
/* Which generation is being collected */
|
/* Which generation is being collected */
|
||||||
cell collecting_gen;
|
cell collecting_gen;
|
||||||
|
|
Loading…
Reference in New Issue