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>
Mon, 20 Feb 2017 19:16:51 +0000 (11:16 -0800)
commitc8f9db184cc929ebde845730a6d4b7864e423a84
tree9167a510e45d2e913b97cfd851b12536c1e2f74a
parent8406ddf8f0bd5453d6213973daed35991f80972a
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