Does the android simulator use the same amount of memory as the real device? For example if my app doesn't run out of memory on a simulator, does it mean that it doesn't run out of memory on an actual device?
+3
A:
When you set up an emulator, you can specify the amount of memory. Here's an example blog post where someone explains the configurations of various common Android devices.
http://mobile.tutsplus.com/tutorials/android/common-android-virtual-device-configurations/
Matt Huggins
2010-07-13 19:06:12
the map heap size per app is limited to 16/24/48MB on a real device depending on the device. The emulator usually is limited to 16MB per app just like on of the older devices like G1. This parameter you cannot set when creating an avd, but you can pass it as parameter when launching the emulator, i.e.: -prop dalvik.vm.heapsize=24m This way you can also simulate the correct 'heap per app' size correctly for your device.
Mathias Lin
2010-07-14 00:35:24
thanks a lot can you please tell me how i can run the simulator using that code? I'm on a mac
aryaxt
2010-07-14 17:25:14
@aryaxt - are you running an IDE like Eclipse, or are you simply launching from the command line?
Matt Huggins
2010-07-14 22:16:20
mmm i usually run it from eclipse, but i can run it from command line as well, do i simply add what u mentioned at the end of my command?"emulator -avd <myEmulator> -prop dalvik.vm.heapsize=24m" something like this?
aryaxt
2010-07-15 15:22:58