日期:2014-05-17 浏览次数:20837 次
//获取内存负载信息
private string GetSysMemRunStatus()
{
Process CurProcess;
CurProcess = System.Diagnostics.Process.GetCurrentProcess();//当前进程
int count = CurProcess.Threads.Count;//1就是这句话有问题;//
string szProcInfo = String.Format("线程:{0},物理内存:{1}KB ,虚拟内存:{2}KB\r\n", count, count, count);// CurProcess.Threads.Count, CurProcess.WorkingSet / 1024, CurProcess.VirtualMemorySize / 1024); //虚拟内存大小
//string szProcInfo = "";
CurProcess.Dispose();//
return szProcInfo;
}