Fix major whole-heap verification if the nursery end up partially cleaned.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 29 May 2012 21:14:10 +0000 (18:14 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 29 May 2012 21:28:27 +0000 (18:28 -0300)
mono/metadata/sgen-gc.c

index 2e6bace79249af8c3034d57bdca8eadd0700d487..ea0a0e2712113780cd727c02dd953d4a8ff63e2a 100644 (file)
@@ -2833,9 +2833,6 @@ major_do_collection (const char *reason)
        last_collection_old_los_memory_usage = los_memory_usage;
        objects_pinned = 0;
 
-       if (whole_heap_check_before_collection)
-               sgen_check_whole_heap_stw ();
-
        //count_ref_nonref_objs ();
        //consistency_check ();
 
@@ -2858,6 +2855,9 @@ major_do_collection (const char *reason)
        /* Pinning depends on this */
        sgen_clear_nursery_fragments ();
 
+       if (whole_heap_check_before_collection)
+               sgen_check_whole_heap_stw ();
+
        TV_GETTIME (btv);
        time_major_pre_collection_fragment_clear += TV_ELAPSED (atv, btv);