pengdlzn
pengdlzn

Reputation: 33

How to output memory usage profiled by Diagnostic Tools?

Microsoft Visual Studio 2017 provides Diagnostic Tools. Using this tool, we can read the memory used at anytime during a program is running, which is very helpful. However, this reading has to be manually.

The original problem I want to solve is to get the peak memory usage for each instance in a single process. If I can output, from Diagnostic Tools, the memory usage together with the time, then I can write a program to find the peak memory usage during a time interval, where each time interval is recorded for solving an instance.

I understand that the memory measured by Diagnostic Tools is actually PeakPagedMemorySize64 of class Process, while I really want to know is the value of PeakWorkingSet64. Nevertheless, this is acceptable because the two values are quite close (for an instance, PeakPagedMemorySize64 = 1,272,377,344 bytes and PeakWorkingSet64 = 1,225,867,264 bytes).

Upvotes: 0

Views: 286

Answers (0)

Related Questions