From 1855d4fd851345a1db90a8a87704afc104e07915 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 15 Dec 2008 19:59:16 +0000 Subject: [PATCH] fix a problem in blame-the-parent accounting svn: r12858 --- src/mzscheme/gc2/mem_account.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mzscheme/gc2/mem_account.c b/src/mzscheme/gc2/mem_account.c index 76ca9eaf45..c6c6208fbd 100644 --- a/src/mzscheme/gc2/mem_account.c +++ b/src/mzscheme/gc2/mem_account.c @@ -430,6 +430,11 @@ static void BTC_do_accounting(NewGC *gc) if(owner_table[i]) owner_table[i]->memory_use = 0; + /* start with root: */ + while (cur->parent && SCHEME_PTR1_VAL(cur->parent)) { + cur = SCHEME_PTR1_VAL(cur->parent); + } + /* walk forward for the order we want (blame parents instead of children) */ while(cur) { int owner = custodian_to_owner_set(gc, cur);