4 struct tenured_space : free_list_allocator<object> {
5 object_start_map starts;
6 std::vector<object *> mark_stack;
8 explicit tenured_space(cell size, cell start) :
9 free_list_allocator<object>(size,start), starts(size,start) {}
11 object *allot(cell size)
13 object *obj = free_list_allocator<object>::allot(size);
16 starts.record_object_start_offset(obj);
25 return (cell)next_allocated_block_after(this->first_block());
28 cell next_object_after(cell scan)
30 cell size = ((object *)scan)->size();
31 object *next = (object *)(scan + size);
32 return (cell)next_allocated_block_after(next);
35 void clear_mark_bits()
37 state.clear_mark_bits();
40 void clear_mark_stack()
45 bool marked_p(object *obj)
47 return this->state.marked_p(obj);
50 void mark_and_push(object *obj)
52 this->state.set_marked_p(obj);
53 this->mark_stack.push_back(obj);
58 free_list_allocator<object>::sweep();
59 starts.update_for_sweep(&this->state);