As we all know Java 5 introduced the ability for Instrumentation to get the size of an object with ease. Is there such a method on Android and Dalvik?
The java
For this problem, it is better not to use a programatic approach but to use the Memory Analyzer Tool (MAT) from www.eclipse.org/mat/ It has both standalone version and plugin for Eclipse. With it you can create a snapshot of Dalvik heap and then you could sort the list of objects by their size or also by the size of their referenced objects (retained size). I used this exactly for troubleshooting a bitmap cache leaks.