From: Kaz Wesley Date: Fri, 9 Feb 2018 19:06:25 +0000 (-0800) Subject: Change amnesiac GC to no GC X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b088ceec36955de012b776ddf008d6ca7fa403aa;p=muddle-interpreter.git Change amnesiac GC to no GC More interesting for testing. Signed-off-by: Kaz Wesley --- 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';