Measures peak memory usage of a program
This program uses Windows/Linux API to run a process and get its peak memory usage.
peak program1 [program2 program3 ...] [-p] [-n] [-d]
You may place the arguments anywhere and in any order.
- If
-p
is not used, every program will be started after the previous one has been finished. If it is, all programs will be started (almost) simultaneously. (The peak memory usage will always be printed in order, though) - It
-n
is used, every program standard output (but not the standard error) will be redirected to null. - If
-d
is used, the working directory for every program will be set to the folder where it is placed. If it is not, the working directory will be the same as it was for the terminal or command prompt.
- Windows and Linux memory management is not strictly identical.
- The sources used to get the peak memory (PeakWorkingSetSize in Windows and ru_maxrss in Linux) do not measure the same thing on both Windows and Linux.