I'm surprised Daniel didn't use valgrind's massif tool for this. It's a really brilliant way to visualise what heap structures are using memory in C programs.
https://valgrind.org/docs/manual/ms-manual.html
Here's the output of massif from the curl command that is used in the posting:
http://oirase.annexia.org/curl-8.18.0-massif.txt