From 9372862ee2dc7992e0e398cb01a5e832e2e26601 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 7 Sep 2015 19:07:17 -0600 Subject: [PATCH] GC: move minor work to clean-up phase instead of setup --- racket/src/racket/gc2/newgc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/racket/src/racket/gc2/newgc.c b/racket/src/racket/gc2/newgc.c index c919286006..4acf5adf08 100644 --- a/racket/src/racket/gc2/newgc.c +++ b/racket/src/racket/gc2/newgc.c @@ -4180,7 +4180,6 @@ static void mark_backpointers(NewGC *gc) mmu_write_unprotect_page(gc->mmu, work->addr, real_page_size(work)); } work->marked_from = 1; - work->previous_size = PREFIX_SIZE; if (work->size_class) { /* must be a big page */ work->size_class = 3; @@ -4207,9 +4206,6 @@ static void mark_backpointers(NewGC *gc) work->previous_size = PREFIX_SIZE; traversed++; } else { - GCDEBUG((DEBUGOUTF,"Setting previous_size on %p to %i\n", work, - work->size)); - work->previous_size = work->size; skipped++; } } @@ -4760,6 +4756,7 @@ static void clean_up_heap(NewGC *gc) GCVERBOSEPAGE(gc, "clean_up_heap BIG PAGE ALIVE", work); work->marked_on = 0; work->marked_from = 0; + work->previous_size = work->size; memory_in_use += work->size; prev = work; } @@ -4770,6 +4767,7 @@ static void clean_up_heap(NewGC *gc) for (work = gc->gen1_pages[i]; work; work = work->next) { work->marked_on = 0; work->marked_from = 0; + work->previous_size = work->size; memory_in_use += work->size; } }