code->flush_icache();
}
-void factor_vm::collect_growing_heap(cell requested_bytes, bool trace_contexts_p)
+void factor_vm::collect_growing_heap(cell requested_size, bool trace_contexts_p)
{
/* Grow the data heap and copy all live objects to the new heap. */
data_heap *old = data;
- set_data_heap(data->grow(requested_bytes));
+ set_data_heap(data->grow(requested_size));
collect_mark_impl(trace_contexts_p);
collect_compact_code_impl(trace_contexts_p);
code->flush_icache();
if(gc_events) current_gc->event->op = op;
}
-void factor_vm::gc(gc_op op, cell requested_bytes, bool trace_contexts_p)
+void factor_vm::gc(gc_op op, cell requested_size, bool trace_contexts_p)
{
assert(!gc_off);
assert(!current_gc);
collect_compact(trace_contexts_p);
break;
case collect_growing_heap_op:
- collect_growing_heap(requested_bytes,trace_contexts_p);
+ collect_growing_heap(requested_size,trace_contexts_p);
break;
default:
critical_error("Bad GC op",current_gc->op);
object *factor_vm::allot_large_object(cell type, cell size)
{
/* If tenured space does not have enough room, collect and compact */
- if(!data->tenured->can_allot_p(size + data->high_water_mark()))
+ cell requested_size = size + data->high_water_mark();
+ if(!data->tenured->can_allot_p(requested_size))
{
primitive_compact_gc();
/* If it still won't fit, grow the heap */
- if(!data->tenured->can_allot_p(size))
+ if(!data->tenured->can_allot_p(requested_size))
{
gc(collect_growing_heap_op,
size, /* requested size */
void collect_compact_impl(bool trace_contexts_p);
void collect_compact_code_impl(bool trace_contexts_p);
void collect_compact(bool trace_contexts_p);
- void collect_growing_heap(cell requested_bytes, bool trace_contexts_p);
- void gc(gc_op op, cell requested_bytes, bool trace_contexts_p);
+ void collect_growing_heap(cell requested_size, bool trace_contexts_p);
+ void gc(gc_op op, cell requested_size, bool trace_contexts_p);
void scrub_context(context *ctx);
void scrub_contexts();
void primitive_minor_gc();