Gcf command to mess with LOH compaction.

This commit is contained in:
Pieter-Jan Briers
2020-12-29 14:10:15 +01:00
parent 28caf0d74c
commit 0ba00a1845

View File

@@ -781,6 +781,21 @@ namespace Robust.Client.Console.Commands
}
}
internal class GcFullCommand : IConsoleCommand
{
public string Command => "gcf";
public string Description => "Run the GC, fully, compacting LOH and everything.";
public string Help => "gcf";
public bool Execute(IDebugConsole console, params string[] args)
{
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
GC.Collect(2, GCCollectionMode.Forced, true, true);
return false;
}
}
internal class GcModeCommand : IConsoleCommand
{