From 25303fc4a5398344b9ef0e964622c21df4518dd4 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 23 Oct 2015 02:44:55 -0400 Subject: [PATCH] Added temporary debug code to stop after 2 major GC's --- runtime.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index f13ad143..0a9de49d 100644 --- a/runtime.c +++ b/runtime.c @@ -9,6 +9,8 @@ #include "cyclone/types.h" #include "cyclone/runtime.h" +int JAE_DEBUG = 0; + /* Error checking section - type mismatch, num args, etc */ /* Type names to use for error messages */ const char *tag_names[21] = { \ @@ -2716,7 +2718,8 @@ fprintf(stdout, "DEBUG, starting major mark/sweep GC\n"); // JAE DEBUG } max_freed = gc_collect(Cyc_heap, &freed); printf("done, freed = %d, max_freed = %d\n", freed, max_freed); -//exit(1); // JAE DEBUG +JAE_DEBUG++; +if (JAE_DEBUG == 2) exit(1); // JAE DEBUG } //fprintf(stdout, "DEBUG, finished minor GC\n"); // JAE DEBUG