Environment.WorkingSet 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取映射到进程上下文的物理内存量。
public:
static property long WorkingSet { long get(); };
public static long WorkingSet { get; }
static member WorkingSet : int64
Public Shared ReadOnly Property WorkingSet As Long
属性值
一个 64 位带符号整数,包含映射到进程上下文的物理内存字节的数目。
示例
以下示例显示运行代码示例的计算机的工作集的大小。
// Sample for the Environment::WorkingSet property
using namespace System;
int main()
{
Console::WriteLine( "WorkingSet: {0}", Environment::WorkingSet );
}
/*
This example produces the following results:
WorkingSet: 5038080
*/
// Sample for the Environment.WorkingSet property
using System;
class Sample
{
public static void Main()
{
Console.WriteLine("WorkingSet: {0}", Environment.WorkingSet);
}
}
/*
This example produces the following results:
WorkingSet: 5038080
*/
// Sample for the Environment.WorkingSet property
open System
printfn $"WorkingSet: {Environment.WorkingSet}"
// This example produces the following results:
// WorkingSet: 5038080
' Sample for the Environment.WorkingSet property
Class Sample
Public Shared Sub Main()
Console.WriteLine("WorkingSet: {0}", Environment.WorkingSet)
End Sub
End Class
'
'This example produces the following results:
'
'WorkingSet: 5038080
'