Finding amount of memory taken by an app

Started by
3 comments, last by markr 18 years, 11 months ago
I'd like to find out how much memory a currently running app is using. I though this would be avalible in the task manager, but I can't see anything obvious. It's just a basic windows app, so I don't need to worry about vram used etc., just heap ram. Anyone know a simple way of doing this? It is a open-source app, so at the worst I could add my own memory logging, but I'm sure theres an easier way...
Advertisement
The Processes tab of Task Manager displays a Memory Usage header in the list view. That's what I've always used when I didn't have my own custom memory usage logger.
Aha! I'm just going blind then. Thanks!
In the Task Manager select Virtual Memory Size to see the actual memory used by each process. The Memory Usage is often misleading.
Arguing on the internet is like running in the Special Olympics: Even if you win, you're still retarded.[How To Ask Questions|STL Programmer's Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
But "Virtual memory size" is fairly misleading as well, as it includes the whole of a DLL's shared pages even though they could be shared with a dozen other processes, and areas of virtual memory mapped into non-memory things, like video memory (depending on the implementation of Windows' drivers), and mapped files.

The truth is, in operating systems which support virtual memory, it's very difficult (particularly ones which support multiple processes).

The best you can usually do is measure the number of private pages, but even then it isn't really right.

Probably using a memory profiler is the way to go, rather than relying on data from your multi-process, virtual memory OS.

Mark

This topic is closed to new replies.

Advertisement