VM: rename of collect_growing_heap_op and collect_growing_heap()

The idea is to "make room" for collect_growing_code_heap_op and
collect_growing_code_heap() to enable code heap growth.
char-rename
Björn Lindqvist 2016-10-13 01:46:52 +02:00
parent 55e6ccb708
commit aace892527
6 changed files with 10 additions and 10 deletions

View File

@ -12,7 +12,7 @@ inline object* factor_vm::allot_large_object(cell type, cell size) {
// If it still won't fit, grow the heap
if (!data->tenured->can_allot_p(requested_size)) {
gc(collect_growing_heap_op, size);
gc(collect_growing_data_heap_op, size);
}
}

View File

@ -152,14 +152,14 @@ void factor_vm::collect_compact() {
if (data->high_fragmentation_p()) {
// Compaction did not free up enough memory. Grow the heap.
set_current_gc_op(collect_growing_heap_op);
collect_growing_heap(0);
set_current_gc_op(collect_growing_data_heap_op);
collect_growing_data_heap(0);
}
code->flush_icache();
}
void factor_vm::collect_growing_heap(cell requested_size) {
void factor_vm::collect_growing_data_heap(cell requested_size) {
// Grow the data heap and copy all live objects to the new heap.
data_heap* old = data;
set_data_heap(data->grow(&nursery, requested_size));

View File

@ -116,8 +116,8 @@ void factor_vm::collect_full() {
if (data->low_memory_p()) {
// Full GC did not free up enough memory. Grow the heap.
set_current_gc_op(collect_growing_heap_op);
collect_growing_heap(0);
set_current_gc_op(collect_growing_data_heap_op);
collect_growing_data_heap(0);
} else if (data->high_fragmentation_p()) {
// Enough free memory, but it is not contiguous. Perform a
// compaction.

View File

@ -137,8 +137,8 @@ void factor_vm::gc(gc_op op, cell requested_size) {
case collect_compact_op:
collect_compact();
break;
case collect_growing_heap_op:
collect_growing_heap(requested_size);
case collect_growing_data_heap_op:
collect_growing_data_heap(requested_size);
break;
default:
critical_error("in gc, bad GC op", current_gc->op);

View File

@ -9,7 +9,7 @@ enum gc_op {
collect_to_tenured_op,
collect_full_op,
collect_compact_op,
collect_growing_heap_op
collect_growing_data_heap_op
};
struct gc_event {

View File

@ -349,7 +349,7 @@ struct factor_vm {
void collect_full();
void collect_compact_impl();
void collect_compact();
void collect_growing_heap(cell requested_size);
void collect_growing_data_heap(cell requested_size);
void gc(gc_op op, cell requested_size);
void primitive_minor_gc();
void primitive_full_gc();