Comments

Off the top of my head, no, I don't think so. One could write such a utility (in fact such utilities likely already exist outside sage) to track memory usage of a process over some period of time (e.g. start and stop of some computation). It would also have to track memory usage across child processes as many computations can launch subprocesses, either to run other programs, or to parallelize the computation. This make computing the exact memory usage a bit tricky since parallel processes in particular will use a lot of shared memory.