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