Commit fcfed3deb79 by Armin Rigo

fix 926d81d98692

--HG--
branch : hashtable
parent 926d81d9869
......@@ -390,6 +390,24 @@ static void deal_with_objects_with_finalizers(void)
LIST_FREE(_finalizer_emptystack);
}
static void mark_visit_from_finalizer1(char *base, struct finalizers_s *f)
{
if (f != NULL && f->run_finalizers != NULL) {
LIST_FOREACH_R(f->run_finalizers, object_t * /*item*/,
mark_visit_object(item, base));
}
}
static void mark_visit_from_finalizer_pending(void)
{
long j;
for (j = 1; j <= NB_SEGMENTS; j++) {
struct stm_priv_segment_info_s *pseg = get_priv_segment(j);
mark_visit_from_finalizer1(pseg->pub.segment_base, pseg->finalizers);
}
mark_visit_from_finalizer1(stm_object_pages, &g_finalizers);
}
static void _execute_finalizers(struct finalizers_s *f)
{
if (f->run_finalizers == NULL)
......
......@@ -6,6 +6,7 @@ struct finalizers_s {
uintptr_t *running_next;
};
static void mark_visit_from_finalizer_pending(void);
static void deal_with_young_objects_with_finalizers(void);
static void deal_with_old_objects_with_finalizers(void);
static void deal_with_objects_with_finalizers(void);
......
......@@ -631,6 +631,7 @@ static void major_collection_now_at_safe_point(void)
mark_visit_from_modified_objects();
mark_visit_from_markers();
mark_visit_from_roots();
mark_visit_from_finalizer_pending();
LIST_FREE(mark_objects_to_trace);
/* finalizer support: will mark as WL_VISITED all objects with a
......
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