提交 e2d6e20d 编写于 作者: J Jonathan Chambers

Register class static data and thread static data directly as roots, since we...

Register class static data and thread static data directly as roots, since we do not track dirty state for static fields. Without this we miss writes in the incremental case.
上级 8a255d44
......@@ -1871,6 +1871,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *class, gboolean
/*g_print ("bitmap 0x%x for %s.%s (size: %d)\n", bitmap [0], class->name_space, class->name, class_size);*/
statics_gc_descr = mono_gc_make_descr_from_bitmap (bitmap, max_set + 1);
vt->data = mono_gc_alloc_fixed (class_size, statics_gc_descr);
mono_gc_register_root (vt->data, class_size, NULL);
mono_domain_add_class_static_data (domain, class, vt->data, NULL);
if (bitmap != default_bitmap)
g_free (bitmap);
......
......@@ -3548,6 +3548,7 @@ mono_alloc_static_data (gpointer **static_data_ptr, guint32 offset)
gpointer* static_data = *static_data_ptr;
if (!static_data) {
static_data = mono_gc_alloc_fixed (static_data_size [0], NULL);
mono_gc_register_root (static_data, static_data_size [0], NULL);
*static_data_ptr = static_data;
mono_gc_wbarrier_generic_store_ptr (&static_data [0], static_data);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册