4 /* generational copying GC divides memory into zones */
6 /* allocation pointer is 'here'; its offset is hardcoded in the
13 cell init_zone(cell size_, cell start_)
16 start = here = start_;
35 char *allot_markers_end;
43 /* the 0th generation is where new objects are allocated. */
44 cell nursery() { return 0; }
46 /* where objects hang around */
47 cell aging() { return gen_count - 2; }
49 /* the oldest generation */
50 cell tenured() { return gen_count - 1; }
52 bool have_aging_p() { return gen_count > 2; }
54 explicit data_heap(factor_vm *myvm, cell gen_count, cell young_size, cell aging_size, cell tenured_size);
58 static const cell max_gen_count = 3;
60 inline static bool in_zone(zone *z, object *pointer)
62 return (cell)pointer >= z->start && (cell)pointer < z->end;