Results 1 to 3 of 3

Thread: How to measure memory of Qt Application,

  1. #1
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up How to measure memory of Qt Application,

    Hello Friends,

    I am using Qt4.2 with mingw compiler in windows, I want to mesure memory of my application, Now i am getting memory from task manager ?

    Is there any tools for measure memory of qt applications in windows ? Please help me!

    Thanks,
    Rajesh.S

  2. #2
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to measure memory of Qt Application,

    You can check the memory usage of a class by overriding the new operator of it. But that does not include sizes of pointer-members which get new'ed later. Also if the class is created on stack, new does not get called ...

  3. #3
    Join Date
    Nov 2006
    Location
    Shrewsbury, UK
    Posts
    97
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to measure memory of Qt Application,

    To start, Task Manager can give you an indication of memory utilisation, both actual an virtual if you add the appropriate columns. Very usefully it can also show the number the GDI handles taken up by the application since these can also "leak" if not properly released.

    But better is to try using "perfmon" to measure the process memory for your application. There are a lot memory counters available, but I tend to graph the "Private Bytes" counter on the process as this has always been a reasonably good indicator of heap growth. I have single stepped though applications while watching this counted.

    Then there's process explorer, that used to be on www.sysinternals.com, but this has now been swallowed up Microsoft - the link should still get you there.

    Pete

Similar Threads

  1. Memory Leak in my Application :-(
    By Svaths in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 19:42
  2. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  3. Replies: 3
    Last Post: 8th December 2006, 18:51
  4. Qt 4.1 Memory Leak
    By blackliteon in forum Qt Programming
    Replies: 14
    Last Post: 10th February 2006, 12:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.