Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetWorkingSetLimitsCore()

void System.Diagnostics.Process.SetWorkingSetLimitsCore ( IntPtr? newMin,
IntPtr? newMax,
out IntPtr resultingMin,
out IntPtr resultingMax )
inlineprivate

Definition at line 1704 of file Process.cs.

1705 {
1707 if (!global::Interop.Kernel32.GetProcessWorkingSetSizeEx(handle, out var min, out var max, out var flags))
1708 {
1709 throw new Win32Exception();
1710 }
1711 if (newMin.HasValue)
1712 {
1713 min = newMin.Value;
1714 }
1715 if (newMax.HasValue)
1716 {
1717 max = newMax.Value;
1718 }
1719 if ((long)min > (long)max)
1720 {
1721 if (newMin.HasValue)
1722 {
1724 }
1726 }
1727 if (!global::Interop.Kernel32.SetProcessWorkingSetSizeEx(handle, min, max, 0))
1728 {
1729 throw new Win32Exception();
1730 }
1731 if (!global::Interop.Kernel32.GetProcessWorkingSetSizeEx(handle, out min, out max, out flags))
1732 {
1733 throw new Win32Exception();
1734 }
1735 resultingMin = min;
1736 resultingMax = max;
1737 }
SafeProcessHandle GetProcessHandle()
Definition Process.cs:1690
static string BadMinWorkset
Definition SR.cs:28
static string BadMaxWorkset
Definition SR.cs:30
Definition SR.cs:7

References System.SR.BadMaxWorkset, System.SR.BadMinWorkset, System.Runtime.Serialization.Dictionary, System.Diagnostics.Process.GetProcessHandle(), and System.handle.

Referenced by System.Diagnostics.Process.SetWorkingSetLimits().