view memory of a quick running program
Is there a way to find out what the maximum amount of memory a program uses in its short run time?
I'm not sure how I can access /proc/pid/stat when its gone so soon after i begin running the program.
I thought I might try to parse the output of an strace, but i havent been able to determine what is the memory usage of the stack with that, only changes with sbrks and mmap2s none of which look like they come from changes on the stack (forgive my ignorance). This might be useful still yet incomplete and probably the wrong way to do it.
It would be good to find what the maximum memory usage is, or better yet, to find what the memory usage is at each time it increases, in a good format to search through it.