На MSDN:
BOOL WINAPI GetProcessMemoryInfo (
In HANDLE Process,
Out PPROCESS_MEMORY_COUNTERS ppsmemCounters,
В DWORD cb
);
Пример:
HANDLE hProcess;
PROCESS_MEMORY_COUNTERS pmc;
printf( "\nProcess ID: %u\n", processID );
// Print information about the memory usage of the process.
hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processID );
if (NULL == hProcess)
return;
if (GetProcessMemoryInfo( ( hProcess, &pmc, sizeof(pmc)))
{
printf( "\tWorkingSetSize: 0x%08X - %u\n", pmc.WorkingSetSize,
pmc.WorkingSetSize / 1024);
printf( "\tQuotaPeakPagedPoolUsage: 0x%08X - %u\n",
pmc.QuotaPeakPagedPoolUsage , pmc.QuotaPeakPagedPoolUsage / 1024);
printf( "\tQuotaPagedPoolUsage: 0x%08X - %u\n", pmc.QuotaPagedPoolUsage,
pmc.QuotaPagedPoolUsage / 1024);
printf( "\tQuotaPeakNonPagedPoolUsage: 0x%08X - %u\n",
pmc.QuotaPeakNonPagedPoolUsage,pmc.QuotaPeakNonPagedPoolUsage / 1024 );
printf( "\tQuotaNonPagedPoolUsage:0x%08X-%u\n",pmc.QuotaNonPagedPoolUsage , pmc.QuotaNonPagedPoolUsage / 1024);
printf( "\tPagefileUsage: 0x%08X - %u\n", pmc.PagefileUsage, pmc.PagefileUsage/1024 );
printf( "\tPeakPagefileUsage: 0x%08X - %u\n", pmc.PeakPagefileUsage, pmc.PeakPagefileUsage/1024 );
printf( "\tcb: 0x%08X - %u\n", pmc.cb , pmc.cb / 1024);
}
CloseHandle(hProcess);
Или Вы можете просмотреть полный код с здесь