[sgen] Make Mark&Sweep compile without card tables.
authorMark Probst <mark.probst@gmail.com>
Mon, 20 Dec 2010 19:55:16 +0000 (20:55 +0100)
committerMark Probst <mark.probst@gmail.com>
Mon, 20 Dec 2010 20:00:33 +0000 (21:00 +0100)
mono/metadata/sgen-los.c
mono/metadata/sgen-marksweep.c

index 2d8fa5801d8f678d1294280a9949b66cfeaff2ef..1c100e1bf80d84c2c27328fa6b399318a73875ad 100644 (file)
@@ -498,6 +498,7 @@ mono_sgen_los_iterate_live_block_ranges (sgen_cardtable_block_callback callback)
        }
 }
 
+#ifdef SGEN_HAVE_CARDTABLE
 void
 mono_sgen_los_scan_card_table (SgenGrayQueue *queue)
 {
@@ -507,5 +508,6 @@ mono_sgen_los_scan_card_table (SgenGrayQueue *queue)
                sgen_cardtable_scan_object (obj->data, obj->size, NULL, queue);
        }
 }
+#endif
 
 #endif /* HAVE_SGEN_GC */
index 03141735c96a095310df7abd9f8414ae464158c3..bcebdf3291d9d1211c63c92ccb068afeaa671928 100644 (file)
@@ -1816,10 +1816,10 @@ mono_sgen_marksweep_init
        FILL_COLLECTOR_COPY_OBJECT (collector);
        FILL_COLLECTOR_SCAN_OBJECT (collector);
 
-
+#ifdef SGEN_HAVE_CARDTABLE
        /*cardtable requires major pages to be 8 cards aligned*/
        g_assert ((MS_BLOCK_SIZE % (8 * CARD_SIZE_IN_BYTES)) == 0);
-
+#endif
 }
 
 #endif