Why is the total memory not equal to the sum of live bytes?
Notice that when you select “memory profiling” you have an option to select “Track every X object allocations.” By default X=10 so the snapshot is showing you information on approximately 10% of the objects that were allocated by your application on the heap. If you change X to 1 then the numbers you see in the snapshot will more closely match the values reported by the Basic Telemetry. But they will still not add up exactly correctly. This is because the profiler itself has to place objects on the heap in order to track your application’s behavior. The other impact of changing X to 1 is that you will dramatically increase the overhead imposed by the profiler (both in terms of CPU time it uses and memory). Typically the memory leak patterns you are looking for are apparent with the default value of X = 10, but your mileage may vary.