From 89807d178ef392cd2e90b4c139160778c6807fb6 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 28 Nov 2015 10:02:53 -0700 Subject: [PATCH] fix accounting of nursery for logging The pre-GC count didn't include the obejcts allocated on the most recent nursery page. --- racket/src/racket/gc2/newgc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/racket/src/racket/gc2/newgc.c b/racket/src/racket/gc2/newgc.c index d290a72577..29eb834a98 100644 --- a/racket/src/racket/gc2/newgc.c +++ b/racket/src/racket/gc2/newgc.c @@ -5788,7 +5788,7 @@ static void garbage_collect(NewGC *gc, int force_full, int no_full, int switchin int do_incremental = 0, check_inc_repair; old_mem_use = gc->memory_in_use; /* includes gc->phantom_count */ - old_gen0 = gc->gen0.current_size + gc->gen0_phantom_count; + old_gen0 = gen0_size_in_use(gc) + gc->gen0_phantom_count; old_mem_allocated = mmu_memory_allocated(gc->mmu) + gc->phantom_count + gc->gen0_phantom_count; TIME_DECLS();