Start counting the number and aggregate size of memory allocations.
The Debug.StartAllocCounting method resets the counts and enables counting. The Debug.StopAllocCounting method disables the counting so that the analysis code doesn't cause additional allocations. The various get methods return the specified value. And the various reset methods reset the specified count.
Counts are kept for the system as a whole (global) and for each thread. The per-thread counts for threads other than the current thread are not cleared by the "reset" or "start" calls.