Detecting and monitoring RAM usage on a Windows system
I would like 开发者_开发知识库to check how much RAM a program I am working on is using, and I was wondering what methods/programs are available that can do this? Is there an easy way to "predict" this? (ie, DLLs are loaded directly into RAM, right? Thus, the file sizes of the DLLs would indicate how much RAM they take up? Am I correct?)
Thanks!
Task Manager Mem Usage / VM Size columns give a fair indication of the amount of memory your application is consuming at a particular point in time. The Peak Mem Usage column gives you the metric you would expect - so could be useful as well.
The size of a DLL on disk is not a fair indication of how much memory that DLL will use once loaded - the code within the DLL is free to allocate memory dynamically as required, so e.g. a 5K DLL could allocate 32GB if it so desires!
精彩评论