[Mono-dev] [PATCH]Add ephemeron support for sgen

Mark Probst mark.probst at gmail.com
Wed May 5 22:47:45 EDT 2010

Hey Rodrigo,

+static void
+null_ephemerons_for_domain (MonoDomain *domain)
+	EphemeronLinkNode *current = ephemeron_list, *prev = NULL;
+	while (current) {
+		MonoObject *object = (MonoObject*)current->array;
+		/*No need to look inside the array as the referenced objects MUST
be on the same domain*/
+		if (object && (!object->vtable || mono_object_domain (object) == domain)) {

Is there actually a case where the vtable is not NULL and the object
is still in the nulled domain?  Unless I'm mistaken this should not
happen because those objects should have been nulled.

+		length = mono_array_length (array);
+		DEBUG (5, fprintf (gc_debug_file, "Processing Ephemeron array at %p
- %p\n", object, old));
+		for (i = 0; i < mono_array_length (array); ++i) {

Should be length here, I guess.

Apart from that it looks good to me.


More information about the Mono-devel-list mailing list