Results 1 to 4 of 4

Thread: memory usage report

  1. #1
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default memory usage report

    Hi,

    I'd like my console application to tell me how much memory it is using. More, specifically, I need to know what was the maximal memory usage during a run. Additionally I'd like it to issue warnings when memory usage is too intensive, and also to let the user know when the program was terminated due to large memory usage.

    Does Qt have something for this?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: memory usage report

    Qt does not provide such a functionality. But you can use a timer and query that informations from your OS using the OS specific API.

  3. The following user says thank you to Lykurg for this useful post:

    timmu (15th February 2012)

  4. #3
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: memory usage report

    Thanks a lot.

    This is very interesting. Do you happen to have a link to some page that would explain that?

  5. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: memory usage report

    for windows, check for MEMORYSTATUS structure and GlobalMemoryStatus function.

  6. The following user says thank you to stampede for this useful post:

    timmu (15th February 2012)

Similar Threads

  1. Bad memory usage on QWebView I think
    By jiturra in forum Qt Programming
    Replies: 15
    Last Post: 21st January 2014, 20:35
  2. Memory usage of simple Qt app
    By DiamonDogX in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2009, 06:53
  3. QStyles and it's memory usage
    By RSX in forum Qt Programming
    Replies: 0
    Last Post: 28th August 2009, 14:18
  4. CPU and Memory Usage
    By philwinder in forum Qt Programming
    Replies: 16
    Last Post: 17th May 2008, 22:25
  5. How to determine memory usage?
    By nopalot in forum General Programming
    Replies: 3
    Last Post: 11th February 2007, 19:50

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
  •  
Qt is a trademark of The Qt Company.