Compute peak memory usage for Linux/Mac running processes