void factor_vm::collect_growing_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)); collect_mark_impl(); collect_compact_impl(); code->flush_icache(); delete old; }
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_size)); collect_mark_impl(trace_contexts_p); collect_compact_code_impl(trace_contexts_p); code->flush_icache(); delete old; }
void factor_vm::load_data_heap(FILE* file, image_header* h, vm_parameters* p) { p->tenured_size = std::max((h->data_size * 3) / 2, p->tenured_size); data_heap *d = new data_heap(&nursery, p->young_size, p->aging_size, p->tenured_size); set_data_heap(d); fixnum bytes_read = raw_fread((void*)data->tenured->start, 1, h->data_size, file); if ((cell)bytes_read != h->data_size) { std::cout << "truncated image: " << bytes_read << " bytes read, "; std::cout << h->data_size << " bytes expected\n"; fatal_error("load_data_heap failed", 0); } data->tenured->initial_free_list(h->data_size); }
void factor_vm::init_data_heap(cell young_size, cell aging_size, cell tenured_size) { set_data_heap(new data_heap(young_size,aging_size,tenured_size)); }
void factor_vm::init_data_heap(cell young_size, cell aging_size, cell tenured_size, bool secure_gc_) { set_data_heap(new data_heap(this,young_size,aging_size,tenured_size)); secure_gc = secure_gc_; }