【API】获取当前进程的内存信息
2021-02-16 23:16
标签:page mem hand ssi cto ado false ges ffffff 【API】获取当前进程的内存信息 标签:page mem hand ssi cto ado false ges ffffff 原文地址:http://blog.51cto.com/383156647/2067782 PROCESS_MEMORY_COUNTERS ProMem = {0};
ProMem.cb = sizeof(PROCESS_MEMORY_COUNTERS);
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,GetCurrentProcessId());
GetProcessMemoryInfo(hProcess,&ProMem,sizeof(ProMem));
CloseHandle(hProcess);
typedef struct _PROCESS_MEMORY_COUNTERS {
DWORD cb;
DWORD PageFaultCount;
SIZE_T PeakWorkingSetSize;
SIZE_T WorkingSetSize;
SIZE_T QuotaPeakPagedPoolUsage;
SIZE_T QuotaPagedPoolUsage;
SIZE_T QuotaPeakNonPagedPoolUsage;
SIZE_T QuotaNonPagedPoolUsage;
SIZE_T PagefileUsage;
SIZE_T PeakPagefileUsage;
} PROCESS_MEMORY_COUNTERS;
上一篇:C#导入导出Excel(一)
下一篇:C# 获取文件基本信息