Memory Management & Windows Messenger
-
I have discovered an interesting behavior in Windows Messenger. When the app. is inactive (minimized to the system tray) it uses only about 4MB of physical memory, when it becomes activated (open main window), consumption of physical memory jumps to 7MB, and finally when the Windows Messenger is closed again (minimized to the tray), the physical memory consumption drops again (to about 2MB). I was wondering how to duplicate such behavior for MFC/WTL/ATL or any other Windows apps? Is there a optimization option/switch in VS.NET? Or a Windows API to manage memory in such fashion? Similar memory behavior occurs for VS.NET and Office XP applications. When minimized they use very little physical memory (at the expense of virtual memory). Mike M WinInsider.com
-
I have discovered an interesting behavior in Windows Messenger. When the app. is inactive (minimized to the system tray) it uses only about 4MB of physical memory, when it becomes activated (open main window), consumption of physical memory jumps to 7MB, and finally when the Windows Messenger is closed again (minimized to the tray), the physical memory consumption drops again (to about 2MB). I was wondering how to duplicate such behavior for MFC/WTL/ATL or any other Windows apps? Is there a optimization option/switch in VS.NET? Or a Windows API to manage memory in such fashion? Similar memory behavior occurs for VS.NET and Office XP applications. When minimized they use very little physical memory (at the expense of virtual memory). Mike M WinInsider.com
Take a look at SetProcessWorkingSetSize in the help. John
-
Take a look at SetProcessWorkingSetSize in the help. John
Many thanks John! I spend 30 min. talking to MS dev. tech supp. rep. telling me that it could not be done. Only tip that he would give is to make sure I delete all references to unused pointers (well ya!) :eek: I should know better and to post question to CP :), right away. Thank you again :) Mike M WinInsider.com