5 /* generational copying GC divides memory into zones */
7 /* allocation pointer is 'here'; its offset is hardcoded in the
28 cell *allot_markers_end;
36 /* the 0th generation is where new objects are allocated. */
37 cell nursery() { return 0; }
39 /* where objects hang around */
40 cell aging() { return gen_count - 2; }
42 /* the oldest generation */
43 cell tenured() { return gen_count - 1; }
45 bool have_aging_p() { return gen_count > 2; }
49 static const cell max_gen_count = 3;
51 inline static bool in_zone(zone *z, object *pointer)
53 return (cell)pointer >= z->start && (cell)pointer < z->end;
56 /* set up guard pages to check for under/overflow.
57 size must be a multiple of the page size */
58 segment *alloc_segment(cell size); // defined in OS-*.cpp files PD
59 void dealloc_segment(segment *block);
64 PRIMITIVE(begin_scan);
65 PRIMITIVE(next_object);