Do not major_free_swept_blocks on Orbis.
authorAndi McClure <andi.mcclure@xamarin.com>
Mon, 10 Jul 2017 21:01:12 +0000 (17:01 -0400)
committerAndi McClure <andi.mcclure@xamarin.com>
Mon, 10 Jul 2017 21:03:17 +0000 (17:03 -0400)
Also, the existing major_free_swept_blocks exemption for Windows is more appropriate for Windows *hosts* than Windows *targets*.

mono/sgen/sgen-marksweep.c

index 2d1bc5b279917b626d7615ea89d0c5ca305d7f7c..04feb680f2d77b9f6b239c0046cf4abf165cb589 100644 (file)
@@ -2137,7 +2137,7 @@ major_free_swept_blocks (size_t section_reserve)
 {
        SGEN_ASSERT (0, sweep_state == SWEEP_STATE_SWEPT, "Sweeping must have finished before freeing blocks");
 
-#ifdef TARGET_WIN32
+#if defined(HOST_WIN32) || defined(HOST_ORBIS)
                /*
                 * sgen_free_os_memory () asserts in mono_vfree () because windows doesn't like freeing the middle of
                 * a VirtualAlloc ()-ed block.