【API】获取当前进程的内存信息

2021-02-16 23:16

阅读:361

标签:page   mem   hand   ssi   cto   ado   false   ges   ffffff   

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;

技术分享图片

【API】获取当前进程的内存信息

标签:page   mem   hand   ssi   cto   ado   false   ges   ffffff   

原文地址:http://blog.51cto.com/383156647/2067782


评论


亲,登录后才可以留言!