Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I know you asked for preferably from outside of the application, but I was googling for how to find such information from within my own program and stumbled upon your post. So, this is to benefit people who want this information from <em>within</em> their program.</p> <p><strong>unmanaged C++</strong></p> <pre><code>#include &lt;windows.h&gt; #include &lt;stdio.h&gt; #include &lt;psapi.h&gt; void PrintMemoryInfo( DWORD processID ) { HANDLE hProcess; PROCESS_MEMORY_COUNTERS pmc; // Print the process identifier. 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, &amp;pmc, sizeof(pmc)) ) { printf( "\tPageFaultCount: 0x%08X\n", pmc.PageFaultCount ); printf( "\tYour app's PEAK MEMORY CONSUMPTION: 0x%08X\n", pmc.PeakWorkingSetSize ); printf( "\tYour app's CURRENT MEMORY CONSUMPTION: 0x%08X\n", pmc.WorkingSetSize ); printf( "\tQuotaPeakPagedPoolUsage: 0x%08X\n", pmc.QuotaPeakPagedPoolUsage ); printf( "\tQuotaPagedPoolUsage: 0x%08X\n", pmc.QuotaPagedPoolUsage ); printf( "\tQuotaPeakNonPagedPoolUsage: 0x%08X\n", pmc.QuotaPeakNonPagedPoolUsage ); printf( "\tQuotaNonPagedPoolUsage: 0x%08X\n", pmc.QuotaNonPagedPoolUsage ); printf( "\tPagefileUsage: 0x%08X\n", pmc.PagefileUsage ); printf( "\tPeakPagefileUsage: 0x%08X\n", pmc.PeakPagefileUsage ); } CloseHandle( hProcess ); } int main( ) { PrintMemoryInfo( GetCurrentProcessId() ); return 0; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload