fix deallocation and repair of long mark stack

svn: r6197
This commit is contained in:
Matthew Flatt 2007-05-10 23:16:20 +00:00
parent a773d2c11a
commit 5d70dbdeef

View File

@ -1372,7 +1372,12 @@ inline static void clear_stack_pages(void)
base = int_top;
for(; int_top; int_top = temp) {
temp = int_top->next;
if(keep) keep--; else free(int_top);
if(keep) {
keep--;
if (!keep)
int_top->next = NULL;
} else
free(int_top);
}
int_top = base;
int_top->top = PPTR(int_top) + 4;
@ -1730,8 +1735,8 @@ static void do_btc_accounting(void)
doing_memory_accounting = 0;
old_btc_mark = new_btc_mark;
new_btc_mark = !new_btc_mark;
clear_stack_pages();
}
clear_stack_pages();
}
struct account_hook {