diff options
author | Keith Packard <keithp@keithp.com> | 2017-12-03 19:47:03 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-12-03 19:47:03 -0800 |
commit | ed6967cef5d82baacafe1c23229f44d58c838326 (patch) | |
tree | 42a297a91356516df606d5a31002f6caa1df3b8a /src/lisp/ao_lisp_cons.c | |
parent | b9009b3916956db00b7b78bd06fb0df704690eb1 (diff) |
altos/lisp: Split out read debug, add memory validation
Split read debug into a separate #define to reduce debug noise
Add some memory validation -- validate stash API, and validate
cons_free calls.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_cons.c')
-rw-r--r-- | src/lisp/ao_lisp_cons.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_cons.c b/src/lisp/ao_lisp_cons.c index c70aa1ca..06e9d361 100644 --- a/src/lisp/ao_lisp_cons.c +++ b/src/lisp/ao_lisp_cons.c @@ -127,6 +127,9 @@ ao_lisp__cons(ao_poly car, ao_poly cdr) void ao_lisp_cons_free(struct ao_lisp_cons *cons) { +#if DBG_FREE_CONS + ao_lisp_cons_check(cons); +#endif while (cons) { ao_poly cdr = cons->cdr; cons->cdr = ao_lisp_cons_poly(ao_lisp_cons_free_list); |