diff --git a/src/coreclr/gc/gcconfig.h b/src/coreclr/gc/gcconfig.h index 886ea17743880d..3decd9e6e3936a 100644 --- a/src/coreclr/gc/gcconfig.h +++ b/src/coreclr/gc/gcconfig.h @@ -65,7 +65,7 @@ class GCConfigStringHolder #define GC_CONFIGURATION_KEYS \ BOOL_CONFIG (ServerGC, "gcServer", NULL, false, "Whether we should be using Server GC") \ BOOL_CONFIG (ConcurrentGC, "gcConcurrent", NULL, true, "Whether we should be using Concurrent GC") \ - BOOL_CONFIG (ConservativeGC, "gcConservative", NULL, false, "Enables/Disables conservative GC") \ + BOOL_CONFIG (ConservativeGC, "gcConservative", NULL, true, "Enables/Disables conservative GC") \ BOOL_CONFIG (ForceCompact, "gcForceCompact", NULL, false, "When set to true, always do compacting GC") \ BOOL_CONFIG (RetainVM, "GCRetainVM", NULL, false, "When set we put the segments that should be deleted on a standby list (instead of " \ "releasing them back to the OS) which will be considered to satisfy new segment requests" \ diff --git a/src/coreclr/inc/clrconfigvalues.h b/src/coreclr/inc/clrconfigvalues.h index a14ba1ec98da4b..57ca1305672deb 100644 --- a/src/coreclr/inc/clrconfigvalues.h +++ b/src/coreclr/inc/clrconfigvalues.h @@ -266,7 +266,7 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_GCBreakOnOOM, W("GCBreakOnOOM"), 0, "Does a RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConcurrent, W("gcConcurrent"), (DWORD)-1, "Enables/Disables concurrent GC") #ifdef FEATURE_CONSERVATIVE_GC -RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConservative, W("gcConservative"), 0, "Enables/Disables conservative GC") +RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConservative, W("gcConservative"), 1, "Enables/Disables conservative GC") #endif RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcServer, W("gcServer"), 0, "Enables server GC") CONFIG_STRING_INFO(INTERNAL_GcCoverage, W("GcCoverage"), "Specify a method or regular expression of method names to run with GCStress") diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index b38d35ebc3440e..d89d687f2ebcbe 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -24,6 +24,7 @@ public static partial class PlatformDetection public static bool IsNetCore => Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); public static bool IsMonoRuntime => Type.GetType("Mono.RuntimeStructs") != null; + public static bool IsUnity => true; public static bool IsNotMonoRuntime => !IsMonoRuntime; public static bool IsMonoInterpreter => GetIsRunningOnMonoInterpreter(); public static bool IsMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") == "aot"; @@ -136,7 +137,7 @@ public static bool IsDrawingSupported // heavily on Reflection.Emit public static bool IsXmlDsigXsltTransformSupported => !PlatformDetection.IsInAppContainer && IsReflectionEmitSupported; - public static bool IsPreciseGcSupported => !IsMonoRuntime; + public static bool IsPreciseGcSupported => !IsMonoRuntime && !IsUnity; public static bool IsNotIntMaxValueArrayIndexSupported => s_largeArrayIsNotSupported.Value;