-/*
- * Mark a range of addresses
- */
-static int
-mark_object(uint8_t *tag, void *addr, int size) {
- int base;
- int bound;
-
- MDBG_DO(if (!AO_LISP_IS_POOL((uint8_t *) addr + size - 1))
- ao_lisp_abort());
-
- base = pool_offset(addr);
- bound = base + size;
-
- MDBG_DO(if (bound > ao_lisp_top) ao_lisp_abort());
-
- if (busy(tag, base))
- return 1;
- if (tag == ao_lisp_busy)
- total_marked += size;
- while (base < bound) {
- mark(tag, base);
- base += 4;
- }
- return 0;
-}
-
-MDBG_DO(
-static int
-clear_object(uint8_t *tag, void *addr, int size) {
- int base;
- int bound;
-
- MDBG_DO(if (!AO_LISP_IS_POOL((uint8_t *) addr + size - 1))
- ao_lisp_abort());
-
- base = (uint8_t *) addr - ao_lisp_pool;
- bound = base + size;
-
- base = limit(base);
- bound = limit(bound);
- if (!busy(tag, base))
- return 1;
- total_marked -= size;
- while (base < bound) {
- clear(tag, base);
- base += 4;
- }
- return 0;
-})
-