Author: lupus
Date: 2006-10-17 10:46:10 -0400 (Tue, 17 Oct 2006)
New Revision: 66747

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/reflection.c
Log:


Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>

        * reflection.c: moving GC fixes.



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2006-10-17 14:15:17 UTC (rev 66746)
+++ trunk/mono/mono/metadata/ChangeLog  2006-10-17 14:46:10 UTC (rev 66747)
@@ -1,4 +1,8 @@
 
+Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+       * reflection.c: moving GC fixes.
+
 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
 
        * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove

Modified: trunk/mono/mono/metadata/reflection.c
===================================================================
--- trunk/mono/mono/metadata/reflection.c       2006-10-17 14:15:17 UTC (rev 
66746)
+++ trunk/mono/mono/metadata/reflection.c       2006-10-17 14:46:10 UTC (rev 
66747)
@@ -2074,6 +2074,10 @@
 
        entry = g_new0 (GenericParamTableEntry, 1);
        entry->owner = owner;
+#ifdef HAVE_SGEN_GC
+       /* FIXME: track where gen_params should be freed and remove the GC root 
as well */
+       MONO_GC_REGISTER_ROOT (entry->gparam);
+#endif
        entry->gparam = gparam; /* FIXME: GC object stored in unmanaged mem */
 
        g_ptr_array_add (assembly->gen_params, entry);
@@ -5467,7 +5471,12 @@
 
        mono_class_init (gclass->klass);
 
+#ifdef HAVE_SGEN_GC
+       /* FIXME: allow unpinned later */
+       res = (MonoReflectionGenericClass *) mono_gc_alloc_pinned_obj 
(mono_class_vtable (domain, System_Reflection_MonoGenericClass), 
mono_class_instance_size (System_Reflection_MonoGenericClass));
+#else
        res = (MonoReflectionGenericClass *) mono_object_new (domain, 
System_Reflection_MonoGenericClass);
+#endif
 
        res->type.type = geninst;
        if (gklass->wastypebuilder && gklass->reflection_info)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to