When doing code heap compaction, don't scan stacks as roots since we're going to exit anyway
parent
e811dd6192
commit
8baaf04ac5
22
vm/data_gc.c
22
vm/data_gc.c
|
@ -149,21 +149,23 @@ void copy_roots(void)
|
||||||
copy_registered_locals();
|
copy_registered_locals();
|
||||||
copy_stack_elements(extra_roots_region,extra_roots);
|
copy_stack_elements(extra_roots_region,extra_roots);
|
||||||
|
|
||||||
save_stacks();
|
if(!performing_compaction)
|
||||||
F_CONTEXT *stacks = stack_chain;
|
|
||||||
|
|
||||||
while(stacks)
|
|
||||||
{
|
{
|
||||||
copy_stack_elements(stacks->datastack_region,stacks->datastack);
|
save_stacks();
|
||||||
copy_stack_elements(stacks->retainstack_region,stacks->retainstack);
|
F_CONTEXT *stacks = stack_chain;
|
||||||
|
|
||||||
copy_handle(&stacks->catchstack_save);
|
while(stacks)
|
||||||
copy_handle(&stacks->current_callback_save);
|
{
|
||||||
|
copy_stack_elements(stacks->datastack_region,stacks->datastack);
|
||||||
|
copy_stack_elements(stacks->retainstack_region,stacks->retainstack);
|
||||||
|
|
||||||
|
copy_handle(&stacks->catchstack_save);
|
||||||
|
copy_handle(&stacks->current_callback_save);
|
||||||
|
|
||||||
if(!performing_compaction)
|
|
||||||
mark_active_blocks(stacks);
|
mark_active_blocks(stacks);
|
||||||
|
|
||||||
stacks = stacks->next;
|
stacks = stacks->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue