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. Monitoring application memory usage

Monitoring application memory usage

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++linuxdebuggingtools
7 Posts 5 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.
  • D Offline
    D Offline
    dushkin
    wrote on last edited by
    #1

    Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!

    D E R 3 Replies Last reply
    0
    • D dushkin

      Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      See here before you get too far into this.

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

      D 1 Reply Last reply
      0
      • D David Crow

        See here before you get too far into this.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

        D Offline
        D Offline
        dushkin
        wrote on last edited by
        #3

        Thanks David for the prompt reply. Unfortunately my question was not clear nor complete... :sigh: What I meant was that I need to verify that memory is cleaned after app is closed. So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.

        D J 2 Replies Last reply
        0
        • D dushkin

          Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!

          E Offline
          E Offline
          ExcellentOrg
          wrote on last edited by
          #4

          Have you taken a look at Glowcode[^]? If that is lot of moolah then take a peek at Free Memory Profiler Tool for C++[^]

          1 Reply Last reply
          0
          • D dushkin

            Thanks David for the prompt reply. Unfortunately my question was not clear nor complete... :sigh: What I meant was that I need to verify that memory is cleaned after app is closed. So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            dushkin wrote:

            What I meant was that I need to verify that memory is cleaned after app is closed.

            It is, whether you want it to be or not.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

            1 Reply Last reply
            0
            • D dushkin

              Thanks David for the prompt reply. Unfortunately my question was not clear nor complete... :sigh: What I meant was that I need to verify that memory is cleaned after app is closed. So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              dushkin wrote:

              What I meant was that I need to verify that memory is cleaned after app is closed.
              So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.

              Emphasizing the previous response - that is always true regardless of what your application does. When the application stops, except for some exotic resources, all resources are cleaned up. Memory (all of it) is released, files are closed, sockets are closed, UI specific resources are closed, etc, etc, etc.

              1 Reply Last reply
              0
              • D dushkin

                Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!

                R Offline
                R Offline
                Rolf Kristensen
                wrote on last edited by
                #7

                The application can monitor itself[^] if you want. Or you can activate Windows Performance Counters[^] for your application, and use Performance Monitor to monitor your application.

                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