winapi - How to retrieve committed memory via C++ -


i've found several answers question here on so, none answers question. i'm trying track down memory leaks in our unmanaged c++ application, , reading following, seems "memory - commit size" best metric use when monitoring memory usage: http://forum.sysinternals.com/virtual-private-bytes-and-working-set_topic18296.html

here's explanation of various metrics reported windows task manager: http://windows.microsoft.com/en-us/windows-vista/what-do-the-task-manager-memory-columns-mean

i've found following describes how retrieve working set data named process: http://msdn.microsoft.com/en-us/library/76yt3c0w.aspx

system.diagnostics.process[] processes =     system.diagnostics.process.getprocessesbyname(theprocessname); system.diagnostics.process process = processes[0]; 

however, mentions nothing committed memory:

can help? paul

it looks want use getprocessmemoryinfo. populates process_memory_counters structure.

the key element of structure you'll interested in is

pagefileusage commit charge value in bytes process. commit charge total amount of memory memory manager has committed running process.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -