After reading the 'Managing You App's Memory' article, I started investigating memory implications by writing "clean code". With this i mean e.g small classes that have one responsibility, programming towards Interfaces, methods that do one thing etc.
However Im not sure how to get actual readings of how much space a binary representation of a class or interface actually will take in the Dalvik JVM. I am currently looking at the byte size of the compiled classes in the intermediates folder. Here I can see that instead of having one large method doing 3 things, 3 different methods actually adds about 100 bytes. Question: Is this measure valid?
I'm guessing that some optimization is happening either when the dex is created, or by proguard when building a release, or by the classloader, however Im fairly new to this subject.
Any good links to literature explaining the Dalvik memory model is much appreciated