- uint16_t offset = pool_offset(addr);
- int i;
-
- for (i = chunk_first; i < chunk_last; i++) {
- if (ao_lisp_chunk[i].old_addr == offset) {
- MDBG_MOVE("move %d -> %d\n",
- ao_lisp_chunk[i].old_addr,
- ao_lisp_chunk[i].new_addr);
- return ao_lisp_pool + ao_lisp_chunk[i].new_addr;
- }
- }
- return addr;
+ int l;
+
+ if (offset < chunk_low || chunk_high <= offset)
+ return offset;
+
+ l = find_chunk(offset);
+
+#if DBG_MEM
+ if (ao_lisp_chunk[l].old_offset != offset)
+ ao_lisp_abort();
+#endif
+ return ao_lisp_chunk[l].new_offset;