From 87def0fc67edbb852e5bafe147bc17552fe98b59 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 20 Oct 2015 00:33:42 -0400 Subject: [PATCH] Noted TODO --- runtime.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime.c b/runtime.c index 65e4d0ab..ef2baf1b 100644 --- a/runtime.c +++ b/runtime.c @@ -2593,6 +2593,7 @@ void GC(cont, args, num_args) closure cont; object *args; int num_args; int scani = 0, alloci = 0; // TODO: not quite sure how to do this yet, want to user pointers but realloc can move them... need to think about how this will work int heap_grown = 0; +fprintf("DEBUG, started minor GC\n"); // JAE DEBUG // Prevent overrunning buffer if (num_args > NUM_GC_ANS) { printf("Fatal error - too many arguments (%d) to GC\n", num_args); @@ -2706,11 +2707,14 @@ void GC(cont, args, num_args) closure cont; object *args; int num_args; // Check if we need to do a major GC if (heap_grown) { size_t freed = 0; - // TODO: not good enough, need to pass current cont/args - // what about mutation barrier, do we care at this point??? +fprintf("DEBUG, starting major mark/sweep GC\n"); // JAE DEBUG + TODO: not good enough, need to pass current cont/args + what about mutation barrier, do we care at this point??? + I don't think so because those are just updates to globals gc_collect(Cyc_heap, &freed); } +fprintf("DEBUG, finished minor GC\n"); // JAE DEBUG longjmp(jmp_main,1); // Return globals gc_cont, gc_ans }