Skip to content

Commit

Permalink
Fix MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException
Browse files Browse the repository at this point in the history
Fixes issue #105422
  • Loading branch information
gwr committed Jul 24, 2024
1 parent 3467852 commit 1477734
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ private static IntPtr ProcessorAffinityCore
/// </summary>
private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet)
{
EnsureState(State.HaveNonExitedId);

// We can only do this for the current process on OS X
if (_processId != Environment.ProcessId)
throw new PlatformNotSupportedException(SR.OsxExternalProcessWorkingSetNotSupported);
Expand Down Expand Up @@ -86,6 +88,8 @@ private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorking
/// <param name="resultingMax">The resulting maximum working set limit after any changes applied.</param>
private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax)
{
EnsureState(State.HaveNonExitedId);

// We can only do this for the current process on OS X
if (_processId != Environment.ProcessId)
throw new PlatformNotSupportedException(SR.OsxExternalProcessWorkingSetNotSupported);
Expand Down

0 comments on commit 1477734

Please sign in to comment.