Skip to content

Commit

Permalink
Add support for setting GCHeapHardLimit (dotnet#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky committed Apr 8, 2021
1 parent 4ae9116 commit fbbbb59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/coreclr/nativeaot/Runtime/RhConfigValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RETAIL_CONFIG_VALUE(StressLogLevel)
RETAIL_CONFIG_VALUE(TotalStressLogSize)
RETAIL_CONFIG_VALUE(DisableBGC)
RETAIL_CONFIG_VALUE(UseServerGC)
RETAIL_CONFIG_VALUE(GCHeapHardLimit)
DEBUG_CONFIG_VALUE(GcStressThrottleMode) // gcstm_TriggerAlways / gcstm_TriggerOnFirstHit / gcstm_TriggerRandom
DEBUG_CONFIG_VALUE(GcStressFreqCallsite) // Number of times to force GC out of GcStressFreqDenom (for GCSTM_RANDOM)
DEBUG_CONFIG_VALUE(GcStressFreqLoop) // Number of times to force GC out of GcStressFreqDenom (for GCSTM_RANDOM)
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/nativeaot/Runtime/gcrhenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,12 @@ bool GCToEEInterface::GetIntConfigValue(const char* privateKey, const char* publ
return true;
}

if (strcmp(privateKey, "GCHeapHardLimit") == 0)
{
*value = g_pRhConfig->GetGCHeapHardLimit();
return true;
}

return false;
}

Expand Down

0 comments on commit fbbbb59

Please sign in to comment.