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
parent
55e6ccb708
commit
aace892527
|
@ -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 it still won't fit, grow the heap
|
||||||
if (!data->tenured->can_allot_p(requested_size)) {
|
if (!data->tenured->can_allot_p(requested_size)) {
|
||||||
gc(collect_growing_heap_op, size);
|
gc(collect_growing_data_heap_op, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,14 +152,14 @@ void factor_vm::collect_compact() {
|
||||||
|
|
||||||
if (data->high_fragmentation_p()) {
|
if (data->high_fragmentation_p()) {
|
||||||
// Compaction did not free up enough memory. Grow the heap.
|
// Compaction did not free up enough memory. Grow the heap.
|
||||||
set_current_gc_op(collect_growing_heap_op);
|
set_current_gc_op(collect_growing_data_heap_op);
|
||||||
collect_growing_heap(0);
|
collect_growing_data_heap(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
code->flush_icache();
|
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.
|
// Grow the data heap and copy all live objects to the new heap.
|
||||||
data_heap* old = data;
|
data_heap* old = data;
|
||||||
set_data_heap(data->grow(&nursery, requested_size));
|
set_data_heap(data->grow(&nursery, requested_size));
|
||||||
|
|
|
@ -116,8 +116,8 @@ void factor_vm::collect_full() {
|
||||||
|
|
||||||
if (data->low_memory_p()) {
|
if (data->low_memory_p()) {
|
||||||
// Full GC did not free up enough memory. Grow the heap.
|
// Full GC did not free up enough memory. Grow the heap.
|
||||||
set_current_gc_op(collect_growing_heap_op);
|
set_current_gc_op(collect_growing_data_heap_op);
|
||||||
collect_growing_heap(0);
|
collect_growing_data_heap(0);
|
||||||
} else if (data->high_fragmentation_p()) {
|
} else if (data->high_fragmentation_p()) {
|
||||||
// Enough free memory, but it is not contiguous. Perform a
|
// Enough free memory, but it is not contiguous. Perform a
|
||||||
// compaction.
|
// compaction.
|
||||||
|
|
|
@ -137,8 +137,8 @@ void factor_vm::gc(gc_op op, cell requested_size) {
|
||||||
case collect_compact_op:
|
case collect_compact_op:
|
||||||
collect_compact();
|
collect_compact();
|
||||||
break;
|
break;
|
||||||
case collect_growing_heap_op:
|
case collect_growing_data_heap_op:
|
||||||
collect_growing_heap(requested_size);
|
collect_growing_data_heap(requested_size);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
critical_error("in gc, bad GC op", current_gc->op);
|
critical_error("in gc, bad GC op", current_gc->op);
|
||||||
|
|
|
@ -9,7 +9,7 @@ enum gc_op {
|
||||||
collect_to_tenured_op,
|
collect_to_tenured_op,
|
||||||
collect_full_op,
|
collect_full_op,
|
||||||
collect_compact_op,
|
collect_compact_op,
|
||||||
collect_growing_heap_op
|
collect_growing_data_heap_op
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gc_event {
|
struct gc_event {
|
||||||
|
|
|
@ -349,7 +349,7 @@ struct factor_vm {
|
||||||
void collect_full();
|
void collect_full();
|
||||||
void collect_compact_impl();
|
void collect_compact_impl();
|
||||||
void collect_compact();
|
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 gc(gc_op op, cell requested_size);
|
||||||
void primitive_minor_gc();
|
void primitive_minor_gc();
|
||||||
void primitive_full_gc();
|
void primitive_full_gc();
|
||||||
|
|
Loading…
Reference in New Issue