In this episode of Defrag Tools, Chad Beeder and Sylvain Goyette discuss how to diagnose issues related to memory usage, using tools available in the Assessment and Deployment Kit (ADK).
We cover two scenarios:
- Looking at the baseline memory footprint of a particular Windows installation, and comparing it to the usage during a certain activity
- Diagnosing memory usage and leaks in a particular app.
[00:00] Introductions and overview
[01:43] Scenario 1: Get a baseline memory measurement of your system at idle, using the Windows Assessment Console. Run the Memory footprint assessment.
[04:08] Open the resulting XML file to see who is using what memory
[08:33] Collect a memory usage snapshot at any time by using Windows Performance Recorder and selecting the Resident Set analysis profile. Capture a short trace.
[10:37] Open the trace with Windows Performance Analyzer and look at the ResidentSet graph to drill into the memory usage data
[16:57] Scenario 2: Memory leak analysis. Capture a longer trace, using VirtualAlloc usage and Heap usage providers.
[18:09] You need to set a registry key to specify which process you want heap tracing enabled on. This is noted in the WPR documentation.
[19:44] What is the difference between heap usage and VirtualAlloc usage?
[20:45] Looking at Sylvain's test app which leaks memory
[22:37] Open the trace in WPA. Use the VirtualAlloc Commit LifeTimes and Heap Allocations graphs to see the memory usage over time and track down where the leaks are in your app.
[31:33] Questions? Email us at email@example.com