[runtime] Add support for using COM types from corlib.
[mono.git] / mono / sgen / sgen-los.c
index b1205cdcf0cd90935f6588395b11b165bf9dee0e..791eaa25abc15fc3868559945a0da42c43f5f7c4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-los.c: Large objects space.
+/**
+ * \file
+ * Large objects space.
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
@@ -624,15 +625,19 @@ get_cardtable_mod_union_for_object (LOSObject *obj)
 }
 
 void
-sgen_los_scan_card_table (CardTableScanType scan_type, ScanCopyContext ctx)
+sgen_los_scan_card_table (CardTableScanType scan_type, ScanCopyContext ctx, int job_index, int job_split_count)
 {
        LOSObject *obj;
+       int i = 0;
 
        binary_protocol_los_card_table_scan_start (sgen_timestamp (), scan_type & CARDTABLE_SCAN_MOD_UNION);
-       for (obj = los_object_list; obj; obj = obj->next) {
+       for (obj = los_object_list; obj; obj = obj->next, i++) {
                mword num_cards = 0;
                guint8 *cards;
 
+               if (i % job_split_count != job_index)
+                       continue;
+
                if (!SGEN_OBJECT_HAS_REFERENCES (obj->data))
                        continue;
 
@@ -640,6 +645,9 @@ sgen_los_scan_card_table (CardTableScanType scan_type, ScanCopyContext ctx)
                        if (!sgen_los_object_is_pinned (obj->data))
                                continue;
 
+                       if (!obj->cardtable_mod_union)
+                               continue;
+
                        cards = get_cardtable_mod_union_for_object (obj);
                        g_assert (cards);
                        if (scan_type == CARDTABLE_SCAN_MOD_UNION_PRECLEAN) {