From e24b73fbfd6f97a8ad971a4880274f38da518338 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 25 Nov 2015 11:42:32 -0700 Subject: [PATCH] minor GC simplification --- racket/src/racket/gc2/mem_account.c | 2 -- racket/src/racket/gc2/newgc.c | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/racket/src/racket/gc2/mem_account.c b/racket/src/racket/gc2/mem_account.c index fb13cf1b59..803de60775 100644 --- a/racket/src/racket/gc2/mem_account.c +++ b/racket/src/racket/gc2/mem_account.c @@ -576,8 +576,6 @@ static void BTC_do_accounting(NewGC *gc) gc->old_btc_mark = gc->new_btc_mark; gc->new_btc_mark = !gc->new_btc_mark; } - - clear_stack_pages(gc); } inline static void BTC_add_account_hook(int type,void *c1,void *c2,uintptr_t b) diff --git a/racket/src/racket/gc2/newgc.c b/racket/src/racket/gc2/newgc.c index 95b9763c42..96360cc011 100644 --- a/racket/src/racket/gc2/newgc.c +++ b/racket/src/racket/gc2/newgc.c @@ -5666,15 +5666,6 @@ static void garbage_collect(NewGC *gc, int force_full, int no_full, int switchin zero_weak_arrays(gc, 0); zero_remaining_ephemerons(gc); -#ifndef NEWGC_BTC_ACCOUNT - /* we need to clear out the stack pages. If we're doing memory accounting, - though, we might as well leave them up for now and let the accounting - system clear them later. Better then freeing them, at least. If we're - not doing accounting, though, there is no "later" where they'll get - removed */ - clear_stack_pages(gc); -#endif - TIME_STEP("zeroed"); check_finalizers(gc, 2); @@ -5759,6 +5750,8 @@ static void garbage_collect(NewGC *gc, int force_full, int no_full, int switchin if (gc->gc_full || !gc->started_incremental) check_marks_cleared(gc); + clear_stack_pages(gc); + TIME_STEP("reset"); /* now we do want the allocator freaking if we go over half */