I have a program which allocates memory. I am running it from Windows PowerShell command line. It can run for 1-2 hours allocating and releasing memory blocks.
What I am looking for is a way to get at the end (when the program finishes) some memory consumption statistics. More specifically, what was the peak usage of the memory (max memory allocated).
Get-Process -Id xxxgives you theProcessobject instance of the process with ID xxx. There are all kinds of memory-related properties in there, including things likePeakVirtualMemorySize64andPeakWorkingSet64. Pick the ones you find useful.You can even set up a background job to get a data series, something like