PrivatePageCount
documentation says:
PrivatePageCount
Data type: uint64
Qualifiers: MappingStrings ("Win32API|Process Status|SYSTEM_PROCESS_INFORMATION|PrivatePageCount"), DisplayName ("Private Page Count")
Current number of pages allocated that are only accessible to the process represented by this Win32_Process instance.
But inspecting the ManagementObjectSearcher values, it looks like the same value as PageFileUsage
, but in bytes instead of kilobytes.
using (var items = new ManagementObjectSearcher(String.Format("Select * From Win32_Process")).Get())
{
foreach (var item in items)
{
var PageFileUsage = (UInt32)item["PageFileUsage"]; // kb
var PrivatePageCount = (UInt64)item["PrivatePageCount"]; // same as PageFileUsage?
Debug.Assert(PageFileUsage == (PrivatePageCount / 1024));
}
}
Multiplying this value by the system's page size (Environment.SystemPageSize
), gives a value in terabytes, but it is not close to Virtual Memory (address space).
Could the documentation be wrong and PrivatePageCount
be equivalent to PageFileUsage
?