Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Memory Management & Windows Messenger

Memory Management & Windows Messenger

Scheduled Pinned Locked Moved C / C++ / MFC
c++performancecsharpvisual-studiocom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mike NET
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • M Mike NET

      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

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      Take a look at SetProcessWorkingSetSize in the help. John

      M 1 Reply Last reply
      0
      • J John M Drescher

        Take a look at SetProcessWorkingSetSize in the help. John

        M Offline
        M Offline
        Mike NET
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups