- int i;
-
- memset(ao_lisp_busy, '\0', sizeof (ao_lisp_busy));
- memset(ao_lisp_cons_note, '\0', sizeof (ao_lisp_cons_note));
- ao_lisp_cons_noted = 0;
- MDBG("mark\n");
- for (i = 0; i < AO_LISP_ROOT; i++) {
- if (ao_lisp_root[i].type) {
- void **a = ao_lisp_root[i].addr, *v;
- if (a && (v = *a)) {
- MDBG("root %d\n", MDBG_OFFSET(v));
- ao_lisp_mark(ao_lisp_root[i].type, v);
- }
- } else {
- ao_poly *a = (ao_poly *) ao_lisp_root[i].addr, p;
- if (a && (p = *a)) {
- MDBG("root 0x%04x\n", p);
- ao_lisp_poly_mark(p, 0);
- }
- }
- }
- while (ao_lisp_cons_noted) {
- memcpy(ao_lisp_cons_last, ao_lisp_cons_note, sizeof (ao_lisp_cons_note));
- memset(ao_lisp_cons_note, '\0', sizeof (ao_lisp_cons_note));
- ao_lisp_cons_noted = 0;
- for (i = 0; i < AO_LISP_POOL; i += 4) {
- if (busy(ao_lisp_cons_last, i)) {
- void *v = ao_lisp_pool + i;
- MDBG("cons %d\n", MDBG_OFFSET(v));
- ao_lisp_mark(&ao_lisp_cons_type, v);
- }
- }
- }