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. Help to find an excesive memory allocation in my application

Help to find an excesive memory allocation in my application

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminperformancehelptutorialquestion
4 Posts 4 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
    mklon22
    wrote on last edited by
    #1

    I have a NMS application running in Windows 2003 server. The application usually has a working set of 35.000 KB aprox, but lastly I've seen that the working set climbs slowly until 600.000 KB aprox. or more... I have revised the too large code with a static analysis tool and I haven't found no suspicious memory leak... I would like to localize the thread that is consuming a big amount of memory but I don't know how to. Do you know any aplication that monitors the memory usage of the several threads of a specific process?. In addition to this, I have found something surprising... Usually I monitor the server by establishing a remote desktop session, when I disconnect the remote desktop session the working set of the application is freed, I mean, It down from 600.000 KB to 30.000 KB..., someone could tell me why?

    A R J 3 Replies Last reply
    0
    • M mklon22

      I have a NMS application running in Windows 2003 server. The application usually has a working set of 35.000 KB aprox, but lastly I've seen that the working set climbs slowly until 600.000 KB aprox. or more... I have revised the too large code with a static analysis tool and I haven't found no suspicious memory leak... I would like to localize the thread that is consuming a big amount of memory but I don't know how to. Do you know any aplication that monitors the memory usage of the several threads of a specific process?. In addition to this, I have found something surprising... Usually I monitor the server by establishing a remote desktop session, when I disconnect the remote desktop session the working set of the application is freed, I mean, It down from 600.000 KB to 30.000 KB..., someone could tell me why?

      A Offline
      A Offline
      Alan Balkany
      wrote on last edited by
      #2

      If everything else fails to find the memory leak, you can try increasing the memory used ten-fold at single points in your application, one at a time. When you see the working set start to climb ten times faster, you've found the leak. I call this approach the "Signal Flare".

      "Microsoft -- Adding unnecessary complexity to your work since 1987!"

      1 Reply Last reply
      0
      • M mklon22

        I have a NMS application running in Windows 2003 server. The application usually has a working set of 35.000 KB aprox, but lastly I've seen that the working set climbs slowly until 600.000 KB aprox. or more... I have revised the too large code with a static analysis tool and I haven't found no suspicious memory leak... I would like to localize the thread that is consuming a big amount of memory but I don't know how to. Do you know any aplication that monitors the memory usage of the several threads of a specific process?. In addition to this, I have found something surprising... Usually I monitor the server by establishing a remote desktop session, when I disconnect the remote desktop session the working set of the application is freed, I mean, It down from 600.000 KB to 30.000 KB..., someone could tell me why?

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

        I can recommend using VLD[^] and compile your application in release mode with the define VLD_FORCE_ENABLE.

        1 Reply Last reply
        0
        • M mklon22

          I have a NMS application running in Windows 2003 server. The application usually has a working set of 35.000 KB aprox, but lastly I've seen that the working set climbs slowly until 600.000 KB aprox. or more... I have revised the too large code with a static analysis tool and I haven't found no suspicious memory leak... I would like to localize the thread that is consuming a big amount of memory but I don't know how to. Do you know any aplication that monitors the memory usage of the several threads of a specific process?. In addition to this, I have found something surprising... Usually I monitor the server by establishing a remote desktop session, when I disconnect the remote desktop session the working set of the application is freed, I mean, It down from 600.000 KB to 30.000 KB..., someone could tell me why?

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

          There are any number of free and commercial libraries and other tools used to find memory and resource leaks in C++ code. However you haven't really identified so far that your application has a "leak". What you have identified is that it uses memory. Which of course any application does. A leak is somethere where memory is consumed unintentionally until all memory is gone.

          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