From a0e2089e563d5e885e47e2afa682f63768f6f76d Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Fri, 18 Oct 2013 00:17:55 +0900 Subject: [PATCH] mark global variables --- src/gc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gc.c b/src/gc.c index 89d4411c..dc9fa2da 100644 --- a/src/gc.c +++ b/src/gc.c @@ -189,6 +189,11 @@ gc_mark_phase(pic_state *pic) gc_mark(pic, env->assoc); } while ((env = env->parent) != NULL); + /* globals */ + for (i = 0; i < pic->glen; ++i) { + gc_mark(pic, pic->globals[i]); + } + gc_mark(pic, pic->sDEFINE); gc_mark(pic, pic->sLAMBDA); gc_mark(pic, pic->sCONS);