I have tracked the heap size and allocated memory on different devices. I wonder why are there differences between these values and what is your approach to it? Thanks for your helps.
my layout.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/square1" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/hello_world"
android:textSize="@dimen/txt_size" />
</FrameLayout>
</RelativeLayout>
Devices

i9100

p6700

n7000

The dalvik vm heap size is set on the /system/build.prop preferences file on each android version/device. The exact preference key is dalvik.vm.heapsize. The value is in megabytes and it depends on the device capabilities
How to deal with the different values? Here are some general hints