What is the win32 API function for private bytes?

What is the win32 API function for private bytes (the ones you can see in perfmon).

I would like to avoid the .NET API

+3
source share
3 answers
BOOL WINAPI GetProcessMemoryInfo(
  __in   HANDLE Process,
  __out  PPROCESS_MEMORY_COUNTERS ppsmemCounters,
  __in   DWORD cb
);

Where the parameter ppsmemCounterscan be a structure PROCESS_MEMORY_COUNTERSor PROCESS_MEMORY_COUNTERS_EX. Just type PROCESS_MEMORY_COUNTERS_EXin PROCESS_MEMORY_COUNTERS.

PROCESS_MEMORY_COUNTERS_EX.PrivateUsage - this is what you are looking for.

More here and here

+12
source

You can collect the same perfmon show data using the performance counter API

+2
source

, . , API.

Technically, private bytes are a latch board, the amount of memory allocated in the swap file, for storing the contents of the applicationโ€™s private memory, if it is replaced.

Usually private bytes = amount of dynamically allocated memory + some additional ones.

0
source

Source: https://habr.com/ru/post/1703414/


All Articles