PDA

View Full Version : How to get memory allocated by my program ?



ay
22nd September 2012, 15:15
iam using qt for my project and my questions
is there a functions in qt that give me the information about memory allocated by my program ?
such that, after i got the information about memory I will print the information in my GUI



Thanks in advance.

Added after 7 minutes:

in my project i'm using opencv library

wysota
22nd September 2012, 16:38
"It depends on"... Usually you can use some library that will substitute malloc() and operator new calls so that you can track most of memory allocations. Another possibility is to use features offered by a particular operating system, e.g. under Linux you can use /proc interface to access kernel stats on your app, including the amount of memory allocated for the process.