How can I find the heap high-water mark?

I am trying to determine the worst-case heap usage (high-water mark) on my system.
I’m aware of the ‘free’ command, but it doesn’t appear to show the worst case heap size.
AFAIK, the ‘used’ value is the ‘current’ amount of heap used, but I’d like to know the max that may have been used prior.
Any thoughts?