private void RunResourceManager(ProcessResourceManager resourceManager, int requiredSizeMb, ManageMemoryMode mode)
 {
     resourceManager.RefreshMemoryCounters();
     resourceManager.TryManageResources(requiredSizeMb, mode);
 }