Measure bytes allocated by gc
Merge pull request #3736 from timholy/allocates

Measure number of bytes allocated