review fixes
authorRahul Kumar <rahku@microsoft.com>
Sat, 13 Aug 2016 00:41:03 +0000 (17:41 -0700)
committerRahul Kumar <rahku@microsoft.com>
Sat, 13 Aug 2016 00:41:03 +0000 (17:41 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/69d0c32ef5500ad1f94bc04401acb3a07c7ae120

src/coreclr/src/gc/gc.cpp

index 08ae56f..c5f9190 100644 (file)
@@ -36705,8 +36705,8 @@ void initGCShadow()
     if (len > (size_t)(g_GCShadowEnd - g_GCShadow)) 
     {
         deleteGCShadow();
-        g_GCShadowEnd = g_GCShadow = (uint8_t *)GCToOSInterface::VirtualReserve(0, len, 0,VirtualReserveFlags::None);
-        if(!GCToOSInterface::VirtualCommit(g_GCShadow, len))
+        g_GCShadowEnd = g_GCShadow = (uint8_t *)GCToOSInterface::VirtualReserve(0, len, 0, VirtualReserveFlags::None);
+        if (g_GCShadow == NULL || !GCToOSInterface::VirtualCommit(g_GCShadow, len))
         {
             _ASSERTE(!"Not enough memory to run HeapVerify level 2");
             // If after the assert we decide to allow the program to continue