Process.MinWorkingSet 屬性

定義

取得或設定關聯的處理序所允許的工作集大小下限,以位元組為單位。

public:
 property IntPtr MinWorkingSet { IntPtr get(); void set(IntPtr value); };
public IntPtr MinWorkingSet { get; [System.Runtime.Versioning.SupportedOSPlatform("windows")] set; }
public IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] get; [System.Runtime.Versioning.SupportedOSPlatform("windows")] [System.Runtime.Versioning.SupportedOSPlatform("freebsd")] [System.Runtime.Versioning.SupportedOSPlatform("macos")] set; }
public IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatform("ios")] [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")] [System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")] get; [System.Runtime.Versioning.SupportedOSPlatform("windows")] [System.Runtime.Versioning.SupportedOSPlatform("freebsd")] [System.Runtime.Versioning.SupportedOSPlatform("macos")] [System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")] set; }
public IntPtr MinWorkingSet { get; set; }
[<set: System.Runtime.Versioning.SupportedOSPlatform("windows")>]
member this.MinWorkingSet : nativeint with get, set
[<set: System.Runtime.Versioning.SupportedOSPlatform("windows")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("freebsd")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("macos")>]
member this.MinWorkingSet : nativeint with get, set
[<set: System.Runtime.Versioning.SupportedOSPlatform("windows")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<get: System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("freebsd")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("macos")>]
[<get: System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<set: System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
member this.MinWorkingSet : nativeint with get, set
member this.MinWorkingSet : nativeint with get, set
Public Property MinWorkingSet As IntPtr

屬性值

IntPtr

nativeint

處理序所需記憶體中工作集大小的最小值,以位元組 (Byte) 為單位。

屬性

例外狀況

工作集大小下限無效。 必須小於或等於工作集大小上限。

無法從關聯的處理序資源擷取工作集資訊。

-或-

處理序識別碼或處理序控制代碼為零,因為尚未啟動處理序。

您正在嘗試存取於遠端電腦上執行之處理序的 MinWorkingSet 屬性。 這個屬性僅供在本機電腦執行的處理序使用。

處理序 Id 無法使用。

-或-

處理序已經結束。

備註

程序的工作集是實體 RAM 記憶體中程序目前可見的記憶體分頁集。 這些頁面是常駐的,可供應用程式使用,而不會觸發分頁錯誤。

工作集包含共用和私人資料。 共用資料包含包含應用程式執行之所有指示的頁面,包括.dll檔案中的頁面和system.dll檔案。 當工作集大小增加時,記憶體需求會增加。

進程具有最小和最大工作集大小。 每次建立進程資源時,系統會保留等於進程工作集大小下限的記憶體數量。 虛擬記憶體管理員會嘗試在進程作用中時至少保留最少的記憶體數量,但永遠不會保留超過大小上限。

系統會設定預設的工作集大小。 您可以使用 和 MinWorkingSet 成員來修改這些大小 MaxWorkingSet 。 不過,設定這些值並不保證記憶體會保留或駐留。

注意

當您增加進程的工作集大小時,會將實體記憶體從系統的其餘部分中移除。 請確定您未要求太大的最小或最大工作集大小,因為這樣做可能會降低系統效能。

適用於

另請參閱