Valgrind Software Quick Start Manual page 154

Table of Contents

Advertisement

--------------------------------------------------------------------------------
n
time(B)
--------------------------------------------------------------------------------
0
0
1
1,008
2
2,016
3
3,024
4
4,032
5
5,040
6
6,048
7
7,056
8
8,064
Each normal snapshot records several things.
• Its number.
• The time it was taken. In this case, the time unit is bytes, due to the use of --time-unit=B.
• The total memory consumption at that point.
• The number of useful heap bytes allocated at that point. This reflects the number of bytes asked for by the program.
• The number of extra heap bytes allocated at that point. This reflects the number of bytes allocated in excess of what
the program asked for. There are two sources of extra heap bytes.
First, every heap block has administrative bytes associated with it. The exact number of administrative bytes depends
on the details of the allocator. By default Massif assumes 8 bytes per block, as can be seen from the example, but
this number can be changed via the --heap-admin option.
Second, allocators often round up the number of bytes asked for to a larger number, usually 8 or 16. This is required
to ensure that elements within the block are suitably aligned. If N bytes are asked for, Massif rounds N up to the
nearest multiple of the value specified by the
• The size of the stack(s). By default, stack profiling is off as it slows Massif down greatly. Therefore, the stack
column is zero in the example. Stack profiling can be turned on with the --stacks=yes option.
total(B)
useful-heap(B) extra-heap(B)
0
0
1,008
1,000
2,016
2,000
3,024
3,000
4,032
4,000
5,040
5,000
6,048
6,000
7,056
7,000
8,064
8,000
--alignment
0
0
8
0
16
0
24
0
32
0
40
0
48
0
56
0
64
0
option.
Massif: a heap profiler
stacks(B)
142

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Software and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents