Commit eea6454f authored by simonmar@microsoft.com's avatar simonmar@microsoft.com
Browse files

use synchronised version of freeChain() in scavenge_mutable_list()

parent 860da5c1
...@@ -33,6 +33,14 @@ allocBlock_sync(void) ...@@ -33,6 +33,14 @@ allocBlock_sync(void)
return bd; return bd;
} }
void
freeChain_sync(bdescr *bd)
{
ACQUIRE_SPIN_LOCK(&gc_alloc_block_sync);
freeChain(bd);
RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Workspace utilities Workspace utilities
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
......
...@@ -18,6 +18,7 @@ extern SpinLock gc_alloc_block_sync; ...@@ -18,6 +18,7 @@ extern SpinLock gc_alloc_block_sync;
#endif #endif
bdescr *allocBlock_sync(void); bdescr *allocBlock_sync(void);
void freeChain_sync(bdescr *bd);
void push_scan_block (bdescr *bd, step_workspace *ws); void push_scan_block (bdescr *bd, step_workspace *ws);
bdescr *grab_todo_block (step_workspace *ws); bdescr *grab_todo_block (step_workspace *ws);
......
...@@ -1052,7 +1052,7 @@ scavenge_mutable_list(generation *gen) ...@@ -1052,7 +1052,7 @@ scavenge_mutable_list(generation *gen)
} }
// free the old mut_list // free the old mut_list
freeChain(gen->saved_mut_list); freeChain_sync(gen->saved_mut_list);
gen->saved_mut_list = NULL; gen->saved_mut_list = NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment