From b088ceec36955de012b776ddf008d6ca7fa403aa Mon Sep 17 00:00:00 2001 From: Kaz Wesley Date: Fri, 9 Feb 2018 11:06:25 -0800 Subject: [PATCH] Change amnesiac GC to no GC More interesting for testing. Signed-off-by: Kaz Wesley --- src/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index 126579f..5ecbcd8 100644 --- a/src/main.c +++ b/src/main.c @@ -89,14 +89,14 @@ main () // Entire toplevel becomes `for (;;) cf->cont.fn();` char buf[512]; ssize_t n; + // no GC (leak everything) + ptop = 1; + vhp = 1; + root = oblist_create (13); + globals = vector_create (64); + init_standard_env (); while ((n = read (STDIN_FILENO, buf, sizeof (buf))) > 0) { - // mock GC (no object persistence) - ptop = 1; - vhp = 1; - root = oblist_create (13); - globals = vector_create (64); - init_standard_env (); // terminate input assert (buf[n - 1] == '\n'); buf[n - 1] = '\0'; -- 2.31.1