* System.GC.HeapHardLimit and .HeapHardLimitPercent in runtimeconfig.json
This adds two new configuration options, "System.GC.HeapHardLimit" and
"System.GC.HeapHardLimitPercent" to runtimeconfig.json. These behave the
same as COMPlus_GCHeapHardLimit and COMPlus_GCHeapHardLimitPercent.
* Add cast
* Dummy change to trigger tests rerun
Commit migrated from https://github.com/dotnet/coreclr/commit/
9227bd5385484f4c652d209f6403e8fb78abd25f
if (!iGCgen0size) iGCgen0size = GetConfigDWORD_DontUse_(CLRConfig::UNSUPPORTED_GCgen0size, iGCgen0size);
#endif //_WIN64
+ const ULONGLONG ullHeapHardLimit = Configuration::GetKnobULONGLONGValue(W("System.GC.HeapHardLimit"));
+ iGCHeapHardLimit = FitsIn<size_t, ULONGLONG>(ullHeapHardLimit)
+ ? static_cast<size_t>(ullHeapHardLimit)
+ : ClrSafeInt<size_t>::MaxInt();
+ iGCHeapHardLimitPercent = Configuration::GetKnobDWORDValue(W("System.GC.HeapHardLimitPercent"), 0);
+
if (g_IGCHoardVM)
iGCHoardVM = g_IGCHoardVM;
else
int GetGCHeapCount() const {LIMITED_METHOD_CONTRACT; return iGCHeapCount;}
int GetGCNoAffinitize () const {LIMITED_METHOD_CONTRACT; return iGCNoAffinitize;}
size_t GetGCAffinityMask() const {LIMITED_METHOD_CONTRACT; return iGCAffinityMask;}
+ size_t GetGCHeapHardLimit() const {LIMITED_METHOD_CONTRACT; return iGCHeapHardLimit;}
+ int GetGCHeapHardLimitPercent() const {LIMITED_METHOD_CONTRACT; return iGCHeapHardLimitPercent;}
#ifdef GCTRIMCOMMIT
int iGCHeapCount;
int iGCNoAffinitize;
size_t iGCAffinityMask;
+ size_t iGCHeapHardLimit;
+ int iGCHeapHardLimitPercent;
#ifdef GCTRIMCOMMIT
return true;
}
+ if (strcmp(key, "GCHeapHardLimit") == 0)
+ {
+ *value = g_pConfig->GetGCHeapHardLimit();
+ return true;
+ }
+
+ if (strcmp(key, "GCHeapHardLimitPercent") == 0)
+ {
+ *value = g_pConfig->GetGCHeapHardLimitPercent();
+ return true;
+ }
+
if (strcmp(key, "GCLOHThreshold") == 0)
{
*value = g_pConfig->GetGCLOHThreshold();