CQ wrote:
[snips]
I would like to check the performance of my c++ programm. That is, I
would like to find out which functions are the most time consuming
ones, for instance. Then I would like to figure out if the program has
some memory leaks.
As others have said, there are various commercial profiler tools.
A limited form of memory leak detection is standard on some
development platforms.
As to profiling: The basic idea is, the tool will "instrument" your
code. That is, it will insert extra lines of code that do things
like marking the call to and return from various functions, and
things like that. You can "roll your own" to get some idea of
the time your code spends in various activities. For example,
at a very simple level you could use the system command
and grab your operating system's time before you start a task
and after you finish. This will be not nearly as sophisticated
as a commercial product.
Socks