I tried to analyze the memory consumption of my application. So I have a .hprof File. The crazy thing now is I get different results with pretty much every software.
I took a Sample Class where I compared all the values. Pretty much all numbers are equal except the Retained memory.
E.g. the Numbers for Retained memory in those tools:
- Opening HPROF in Eclipse Memory Analyzer: 984
- Eclipse Memory Analyzer on the Left Info: 456
- Opening HPROF in Android Studio: 470
- Reading the HPROF with Perflib from Google: 568
Why are there so big difference between those tools? Did anyone of you have similar experience?
If i look into the details in Android Studio of the CommunicationManager class I get the following view and see that the Shadow$_klass has the same value (568) as Perflib. See here:
PerfLib Console Log:
The perflib Output shows the Number which gets returned by ClassObj when I call "getTotalRetainedSize()".
But on the left side in Eclipse Memory Analzyer I can see the following: