PDA

View Full Version : memory usage report



timmu
15th February 2012, 09:45
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!

Lykurg
15th February 2012, 10:03
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.

timmu
15th February 2012, 10:24
Thanks a lot.

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

stampede
15th February 2012, 14:42
for windows, check for MEMORYSTATUS structure and GlobalMemoryStatus function.