I'm running some test codes (my own) and I'd like them to self-report how much memory they use. Ideally this would be a high-water mark. Something like what Activity Monitor or top
report.
C++ code, and needs to work on OSX and/or Linux. An approach that works for both would be great, if not something that works on either one would be welcome.
How can an OSX program find out how much memory it's using?