Can I use memstat to track all allocations and frees?
The default setting of the memstat probes is to pinpoint leaks in a longer-running program. However, you can change the options. From the main RC window select the memstat probe in the UAL list, right click and choose Edit UAL. From the Runtime tab change the Sampling Ratio to 1 so you see every allocation. From the Format tab check the Display Freed Allocations box. You might also find the Display Zero Growth Allocations useful. Next run, you’ll start seeing those freed allocations. Click the OK button and then the Build button. Re-format (either through the Index or Examine button) and the reports should have the information you need.