From 53daba87c2208fcced6c7704dd31932a8a56467b Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 3 Sep 2010 22:07:30 -0300 Subject: [PATCH] Clean the cache in the sweep phase --- rt/gc/cdgc/gc.d | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rt/gc/cdgc/gc.d b/rt/gc/cdgc/gc.d index a728af9..59d9f55 100644 --- a/rt/gc/cdgc/gc.d +++ b/rt/gc/cdgc/gc.d @@ -824,9 +824,6 @@ void mark(void *stackTop) { debug(COLLECT_PRINTF) printf("\tmark()\n"); - gc.p_cache = null; - gc.size_cache = 0; - gc.any_changes = false; for (size_t n = 0; n < gc.pools.length; n++) { @@ -972,6 +969,8 @@ size_t sweep() { // Free up everything not marked debug(COLLECT_PRINTF) printf("\tsweep\n"); + gc.p_cache = null; + gc.size_cache = 0; size_t freedpages = 0; size_t freed = 0; for (size_t n = 0; n < gc.pools.length; n++) -- 2.43.0