Code
using System;
using System.Text;
using System.Runtime.InteropServices;
namespace TaskManager
{
public class Memory
{
static MEMORYSTATUS status = new MEMORYSTATUS();
P/V invoke#region P/V invoke
private struct MEMORYSTATUS
{
public UInt32 dwLength;
public UInt32 dwMemoryLoad;
public UInt32 dwTotalPhys;
public UInt32 dwAvailPhys;
public UInt32 dwTotalPageFile;
public UInt32 dwAvailPageFile;
public UInt32 dwTotalVirtual;
public UInt32 dwAvailVirtual;
}