background image
<< Metrics Viewer Preferences | Memory Profiling Error Messages >>
<< Metrics Viewer Preferences | Memory Profiling Error Messages >>

How Memory Profiling for C and C++ Works

Runtime Analysis
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 get ahead.
·
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.
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 Test RealTime 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 Test RealTime GUI.
Memory Profiling Results for C and C++
After execution of an instrumented application, the Memory Profiling report
provides a summary diagram and a detailed report for both byte and memory block
usage.
A memory block is a number of bytes allocated with a single
malloc
instruction. The
number of bytes contained in each block is the actual amount of memory allocated by
the corresponding allocation instruction.
Summary diagrams
The summary diagrams give you a quick overview of memory usage in blocks and
bytes.
67