[sgen] Don't verify the heap after a major
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 6 Sep 2016 15:20:54 +0000 (18:20 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Tue, 6 Sep 2016 16:59:23 +0000 (19:59 +0300)
We would need to deal with scanning forwarded objects and dead objects which is not worth it. Only verify the heap at the start of a collection, as indicated by the name of the flag.

mono/sgen/sgen-gc.c

index 514b6ba340f5e2438ffeb79ef10e64ca76d82623..ec7471bfe47f536d92e9d456d6992df48e156d57 100644 (file)
@@ -1975,9 +1975,6 @@ major_finish_collection (SgenGrayQueue *gc_thread_gray_queue, const char *reason
        reset_heap_boundaries ();
        sgen_update_heap_boundaries ((mword)sgen_get_nursery_start (), (mword)sgen_get_nursery_end ());
 
-       if (whole_heap_check_before_collection)
-               sgen_check_whole_heap (FALSE);
-
        /* walk the pin_queue, build up the fragment list of free memory, unmark
         * pinned objects as we go, memzero() the empty fragments so they are ready for the
         * next allocations.