I want to increase the default virtual memory heap size of my avd
. I am using Eclipse 3.7.2
for development and when I create (or edit) a avd I set the "Max VM application heap" to 64MB. If I select Details it confirms this and if I inspect the config.ini
file i see that "vm.heapSize=64
" which is correct. The problem is that this is not actually true when running the avd.
In my application I run "Runtime.getRuntime().maxMemory();
" which shows 24MB!!!!
Likewise,
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
int memoryClass = am.getMemoryClass();
Shows 24MB
UPDATE: I noticed that in hardware-qemu.ini the "vm.heapSize=24" ? I changed the value to 64, but when I launch the avd it gets changed back to 24?
UPDATE: totalMemory() returns ~15MB
UPDATE: ADT version is 20.0.1
UPDATE: I have tested this a bunch, making many different AVDs with many different settings and all I can conclude is that the AVD or Eclipse is a bit buggy and often does not reflect the settings values you enter for the AVD. Note that I have made AVD devices that do reflect vm.heapSize=64.