So, @paul-carroll answered part of my question but the answer was incomplete.
When looking for a user-mode memory leak, the Private Bytes counter indicates the total amount of memory that a process has allocated, not including memory shared with other processes. The Virtual Bytes counter indicates the current size of the virtual address space that the process uses. Some memory leaks appear in the data file in the form of an increase in private bytes allocated. Other memory leaks show up in the form of an increase in the virtual address space. So you should monitor both Private Bytes and Virtual Bytes.
To monitor memory for specific processes:
- Open Performance Monitor (press Win+r, type perfmon into Run, OK)
- Select Performance Monitor on the left sidebar
- Add Counters (green plus sign above the graph)
- Expand "Process"
- Select "Private Bytes"
- Select the processes to monitor in the "Instances of selected object" then hit Add
- Repeat for "Process" > "Virtual Bytes"
To monitor CPU usage:
- Repeat "Process" > "%Processor Time"
To monitor GPU usage:
- Add "GPU Process Memory" > "Dedicated Usage". You will need the process id, which you can get from Task Manager or Process Explorer.
- OK
Note: the Private Bytes, Virtual Bytes, and %Processor Time numbers will differ from what you see in Task Manager, but they will agree with what you see in Process Explorer.
If the graph doesn't display the data to your liking, double-click an item in the table below the graph and change settings such as line width, scale, vertical minimum/maximum, etc.
You can also create a User Defined Data Collector Set to record the data and save it as a csv:
- Right-click Performance Monitor in the left sidebar
- New > Data Collector Set
- Follow the wizard to name your set and select a save location
- Leave it as and choose to either save or start and click Finish
- To save as csv, use the left sidebar to go to Data Collector Sets > User Defined > YourDataSet
- Double-click System Monitor Log and change Log format: from binary to Comma Separated
- OK
- Select YourDataSet in the left sidebar and press the green play button to start the Data Collector Set