From 85a5fd5867c0dc85b718b840bf523dd0b4deec69 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Thu, 19 Jan 2017 22:20:33 +0200 Subject: [PATCH] [sgen] Avoid allocating mod union cardtables for los objects when scanning We should consider doing the same when marking the mod union card table, if we have no cards to mark. --- mono/sgen/sgen-los.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mono/sgen/sgen-los.c b/mono/sgen/sgen-los.c index 68f5b933f12..e61ba557818 100644 --- a/mono/sgen/sgen-los.c +++ b/mono/sgen/sgen-los.c @@ -644,6 +644,9 @@ sgen_los_scan_card_table (CardTableScanType scan_type, ScanCopyContext ctx, int 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) { -- 2.11.4.GIT