About Memory Profiling for C and C++

Memory Profiling for C and C++

Run-time memory errors and leaks are among the most difficult errors to locate and the most important to correct. The symptoms of incorrect memory use are unpredictable and typically appear far from the cause of the error. The errors often remain undetected until triggered by a random event, so that a program can seem to work correctly when in fact it's only working by accident.

That's where the Memory Profiling feature can help you.

  • You associate Memory Profiling with an existing test node or application code.

  • You compile and run your application.

  • The application with the Memory Profiling feature, then directs output to the Memory Profiling Viewer, which provides a detailed report of memory issues.

Memory Profiling uses Source Code Insertion Technology for C and C++.

Because of the different technologies involved, Memory Profiling for Java is covered in a separate section.

Memory Profiling for C and C++ supports the following languages:

  • C: ANSI 89, ANSI 99, or K&R C

  • C++: ISO/IEC 14882:1998

How Memory Profiling for C and C++ Works

When an application node is executed, the source code is instrumented by the C or C++ Instrumentor (attolcpp or attolcc1). The resulting source code is then executed and the Memory Profiling feature outputs a static .tsf file for each instrumented source file and a dynamic .tpf file.

These files can be viewed and controlled from the HCL OneTest Embedded GUI. Both the .tsf and .tpf files need to be opened simultaneously to view the report.

Of course, these steps are mostly transparent to the user when the test or application node is executed in the HCL OneTest Embedded GUI or Eclipse (for C and C++).

To learn about See
Performing Memory Profiling on C and C++ source code Using Runtime Analysis Features
How Memory Profiling for C and C++ works Memory Profiling User in C and C++
Source Code Insertion technology Source Code Insertion Technology
JVMPI technology for Java memory analysis JVMPI Technology
Understanding Memory Profiling Reports Memory Profiling Results
Using the Memory Profiler Viewer Using the Memory Profiling Viewer
Customizing the Memory Profiling Viewer Memory Profiling Viewer Preferences

Related Topics

Memory Profiling Settings | Runtime Analysis | Memory Profiling for Java