An application can be instrumented to measure and report its heap size at every function entry and exit. The Application Profiler can then calculate each function's heap size changes and provide a detailed breakdown of heap memory usage.
To profile functions, your source files must be compiled with -finstrument-functions and your binaries linked with -lprofilingS; for details, see Enabling function instrumentation.
The IDE switches to the QNX Analysis perspective. If necessary, the IDE first builds the binary. Then, it uploads the binary and starts running it on the target. At this time, a new session is created and displayed in the Analysis Sessions view. As the application runs, profiling results are sent to the IDE, which stores them in the new session and presents them in the Execution Time view.
Here, the Deep Time column indicates by how much a function increased heap memory consumption (when the value is positive) or decreased it (when the value is negative). Note that a function may allocate some blocks but free others—the value shown is the net increase or decrease in heap memory. Shallow Time (if defined) reports the same metric, so you can ignore this column. Count indicates how many times the call site was executed while Location provides the source file and line of the call site.
The controls in the upper right corner allow you to display certain columns so you can see non-default metrics and to display the functions in a flat list rather than a thread-based tree, as explained in the Execution Time reference. Also, you can compare the results of two profiling sessions to see the effects of any changes you made between execution runs to improve application efficiency.