From 3eeffbb10456e8b58c681635d60f23690ecbf120 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 4 Apr 2008 22:40:48 -0500 Subject: [PATCH] Disable logging for now --- vm/code_gc.c | 1 + vm/data_gc.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/vm/code_gc.c b/vm/code_gc.c index 5b0d2ebabb..54979b8a01 100755 --- a/vm/code_gc.c +++ b/vm/code_gc.c @@ -181,6 +181,7 @@ void free_unmarked(F_HEAP *heap) } break; case B_FREE: + printf("RECLAIMED\n"); if(prev && prev->status == B_FREE) prev->size += scan->size; break; diff --git a/vm/data_gc.c b/vm/data_gc.c index 372409c990..9f6b06a528 100755 --- a/vm/data_gc.c +++ b/vm/data_gc.c @@ -1,6 +1,6 @@ #include "master.h" -#define GC_DEBUG 1 +//#define GC_DEBUG 1 #define ALLOC_DATA_HEAP "alloc_data_heap: gens=%ld, young_size=%ld, aging_size=%ld\n" #define GC_REQUESTED "garbage_collection: code_gc=%d, growing_data_heap=%d, requested_bytes=%ld\n" @@ -12,7 +12,7 @@ #ifdef GC_DEBUG #define GC_PRINT printf #else - INLINE void GC_PRINT(...) { } + INLINE void GC_PRINT() { } #endif CELL init_zone(F_ZONE *z, CELL size, CELL start) @@ -584,7 +584,10 @@ CELL collect_next(CELL scan) do_slots(scan,copy_handle); if(collecting_code) + { + printf("do_code_slots\n"); do_code_slots(scan); + } return scan + untagged_object_size(scan); } @@ -720,6 +723,8 @@ void garbage_collection(CELL gen, growing_data_heap = growing_data_heap_; collecting_gen = gen; + //if(collecting_gen == TENURED) collecting_code = true; + /* we come back here if a generation is full */ if(setjmp(gc_jmp)) { @@ -727,15 +732,15 @@ void garbage_collection(CELL gen, resort to growing the data heap */ if(collecting_gen == TENURED) { - if(collecting_code) + //if(collecting_code) { growing_data_heap = true; /* see the comment in unmark_marked() */ unmark_marked(&code_heap); } - else - collecting_code = true; + //else + // collecting_code = true; } /* we try collecting AGING space twice before going on to collect TENURED */