Skip to content

Commit

Permalink
Gcf command to mess with LOH compaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Dec 29, 2020
1 parent 28caf0d commit 0ba00a1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Robust.Client/Console/Commands/Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,21 @@ public bool Execute(IDebugConsole console, params string[] args)
}
}

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
{

Expand Down

0 comments on commit 0ba00a1

Please sign in to comment.