Nicholas Nethercote 968bddcd4b Fix reads and writes counts in DHAT.
If you do `malloc(100)` followed by `realloc(200)`, DHAT now adds 100
bytes to the read and write counts for the implicit `memcpy`. This gives
more reasonable results.

I have long been surprised by low writes-per-byte values of around 0.35
for vectors that are grown by doubling. Counting the implicit `memcpy`
increases those numbers to well above 0.5, which is what you'd expect.

The commit also adds a section to the DHAT docs about `realloc`, because
there is some non-obvious behaviour, some of which confused me just a
couple of days ago.
2020-05-08 08:40:19 +10:00
..
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2020-05-08 08:40:19 +10:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00
2019-02-01 14:54:34 +11:00