Results 1 to 5 of 5

Thread: Program memory usage in windows

  1. #1
    Join Date
    Jan 2009
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Program memory usage in windows

    Hello:

    I have been using Qt4 on Windows for about four months. I had done a little Qt4 programming on Linux before that. I have noticed that Qt programs, even a "hello world" type application, take over 13 megabytes of primary memory. I thought it was related to loading a framework, but launching a second copy of the application gives a similar footprint. I was wondering what is using this memory. I was also wondering if there is a way to lower memory consumption.

    I have searched online and I have not been able to find anything.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program memory usage in windows

    Are you compiling in debug or release mode?

  3. #3
    Join Date
    Jan 2009
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Program memory usage in windows

    Oops, I guess I was compiling in debug mode. When I switched the config over to release, it lowered the memory usage of the "hello world" application to around 6Meg.

    Thank you for helping me.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program memory usage in windows

    Under Linux you can call "strip" on the binary to further reduce its size and memory consumption. Well... maybe not the "hello world" thing but a regular application.

  5. #5
    Join Date
    Jan 2009
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Program memory usage in windows

    Neat. I will have to try that when I get home tonight. Thanks again.

Similar Threads

  1. Memory debugging in windows
    By txandi in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2009, 13:45
  2. Replies: 19
    Last Post: 21st January 2008, 09:13
  3. Porting my program to another windows machine !
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2007, 06:46
  4. How to determine memory usage?
    By nopalot in forum General Programming
    Replies: 3
    Last Post: 11th February 2007, 19:50
  5. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

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.