PDA

View Full Version : Program memory usage in windows



gerix
30th January 2009, 01:52
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.

wysota
31st January 2009, 09:23
Are you compiling in debug or release mode?

gerix
1st February 2009, 23:33
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.

wysota
2nd February 2009, 00:06
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.

gerix
2nd February 2009, 00:35
Neat. I will have to try that when I get home tonight. Thanks again.