altos/lisp: Add incremental collection
authorKeith Packard <keithp@keithp.com>
Wed, 16 Nov 2016 20:34:14 +0000 (12:34 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 18 Nov 2016 06:18:39 +0000 (22:18 -0800)
commit169454f5613dff38a6159166467b43a163c81e00
tree20f76b66039cbdc854e8d0200b6716899f473b22
parentf144d04fce0ba0cee4bf194518f5959e8ef95405
altos/lisp: Add incremental collection

Realizing that long-lived objects will eventually float to the bottom
of the heap, I added a simple hack to the collector that 'remembers'
the top of the heap the last time a full collect was run and then runs
incremental collects looking to shift only objects above that
boundary. That doesn't perfectly capture the bounds of transient
objects, but does manage to reduce the amount of time spent not moving
persistent objects each time through the collector.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lisp/ao_lisp.h
src/lisp/ao_lisp_make_const.c
src/lisp/ao_lisp_mem.c
src/lisp/ao_lisp_save.c
src/test/ao_lisp_test.c