1 // This test implements a moderately complex call tree. The layout of these
2 // functions matches the layout of the tree produced by dh_view.js, when
3 // sorted by "total bytes".
7 #define F(f, parent) void* f(size_t n) { return parent(n); }
9 // Note: don't use j1 -- that is a builtin C function, believe it or not.
14 F(d2
, c1
) // insig total-bytes
17 F(b3
, a
) F(e
, b3
) F(f
, e
)
18 F(g
, malloc
) F(h
, g
) F(i
, h
)
19 F(j2
, i
) F(k
, j2
) F(l
, k
)
23 F(p
, i
) F(q
, p
) // insig total-bytes
24 F(r
, i
) // insig total-bytes
25 F(s1
, malloc
) F(s2
, s1
) F(s3
, s2
) F(s4
, s3
) F(s5
, s4
)
29 F(w
, v
) // insig total-bytes
30 F(x
, v
) // insig total-bytes
31 F(y
, v
) // insig total-bytes
32 F(z
, v
) // insig total-bytes
36 // Call all the leaves in the above tree.
39 free(d1p
); // So the t-final numbers differ from the t-gmax/total numbers.
59 // And one allocation directly from main().