Get total virtual memory

  • Thread starter Thread starter Christopher Attard
  • Start date Start date
C

Christopher Attard

Hi,

Is there a way to obtain programmatically the total amount of
Virtual memory employed by a machine in .NET?

10x

CHris
 
Hi Christopher,

Christopher Attard said:
Hi,

Is there a way to obtain programmatically the total amount of
Virtual memory employed by a machine in .NET?

10x

CHris

...
System.Management.ManagementObject logicalMem =
new System.Management.ManagementObject

("Win32_LogicalMemoryConfiguration.Name=\"LogicalMemoryConfiguration\"");

Console.WriteLine(
"Total virtual memory: {0}",
logicalMem["TotalVirtualMemory"].ToString());
...

Class System.Management.ManagementObject is in assembly
System.Management.dll.

Regards,
Daniel
 
OK thanks a lot

Chris

Daniel Pratt said:
Hi Christopher,

Christopher Attard said:
Hi,

Is there a way to obtain programmatically the total amount of
Virtual memory employed by a machine in .NET?

10x

CHris

...
System.Management.ManagementObject logicalMem =
new System.Management.ManagementObject

("Win32_LogicalMemoryConfiguration.Name=\"LogicalMemoryConfiguration\"");

Console.WriteLine(
"Total virtual memory: {0}",
logicalMem["TotalVirtualMemory"].ToString());
...

Class System.Management.ManagementObject is in assembly
System.Management.dll.

Regards,
Daniel
 
Back
Top