Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is the total memory not equal to the sum of live bytes?

bytes live memory total
0
Posted

Why is the total memory not equal to the sum of live bytes?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123