record heap usage (not displayed yet)
main: add -heap flag to show heap usage