From ed6967cef5d82baacafe1c23229f44d58c838326 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 3 Dec 2017 19:47:03 -0800 Subject: 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 --- src/lisp/ao_lisp_cons.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lisp/ao_lisp_cons.c') 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); -- cgit v1.2.3