Added NoGCRegion feature

This commit is contained in:
Alex
2025-10-20 11:05:58 +01:00
parent f1710cfb5c
commit 3972e14840
4 changed files with 129 additions and 6 deletions
@@ -42,6 +42,44 @@ public record CoreConfig : BaseConfig
[JsonPropertyName("features")]
public required ServerFeatures Features { get; set; }
[JsonPropertyName("enableNoGCRegions")]
// ReSharper disable once InconsistentNaming
public required bool EnableNoGCRegions { get; set; }
// ReSharper disable once InconsistentNaming
private int _noGCRegionMaxMemoryGB = 4;
[JsonPropertyName("noGCRegionMaxMemoryGB")]
// ReSharper disable once InconsistentNaming
public required int NoGCRegionMaxMemoryGB
{
get => _noGCRegionMaxMemoryGB;
set
{
if (value <= 0)
{
throw new Exception($"Invalid value {nameof(NoGCRegionMaxMemoryGB)}: {value}. Must be greater than zero.");
}
_noGCRegionMaxMemoryGB = value;
}
}
// ReSharper disable once InconsistentNaming
private int _noGCRegionMaxLOHMemoryGB = 3;
[JsonPropertyName("noGCRegionMaxLOHMemoryGB")]
// ReSharper disable once InconsistentNaming
public required int NoGCRegionMaxLOHMemoryGB
{
get => _noGCRegionMaxLOHMemoryGB;
set
{
if (value <= 0)
{
throw new Exception($"Invalid value {nameof(NoGCRegionMaxLOHMemoryGB)}: {value}. Must be greater than zero.");
}
_noGCRegionMaxLOHMemoryGB = value;
}
}
/// <summary>
/// Commit hash build server was created from
/// </summary>