android x86 emulator not respecting vm.heapSize

不羁岁月 提交于 2020-01-02 08:54:07

问题


The Android x86 ( API-10 ) emulator does not seem to respect the VM size specified through the AVD manager. See below for config.ini created from AVD manager

hw.lcd.density=240
sdcard.size=64M
skin.name=WVGA800
skin.path=add-ons/addon-intel_atom_x86_system_image-intel_corporation-10/skins/WVGA800
hw.cpu.arch=x86
abi.type=x86
hw.keyboard=yes
vm.heapSize=96
hw.ramSize=256
image.sysdir.1=add-ons/addon-intel_atom_x86_system_image-intel_corporation-10/images/x86/

When I start up the app I print out what the maxmemory and a few details are using this:

Runtime rt = Runtime.getRuntime();
long maxMemory = rt.maxMemory();
Log.v("onCreate", "maxMemory:" + Long.toString(maxMemory));
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
int memoryClass = am.getMemoryClass();
Log.v("onCreate", "memoryClass:" + Integer.toString(memoryClass));

which gives me

10-12 17:07:53.817: VERBOSE/onCreate(222): maxMemory:25165824
10-12 17:07:53.827: VERBOSE/onCreate(222): memoryClass:24

using Ubuntu 12.04, SDK tools 20.0.3, platform tools 14.

来源:https://stackoverflow.com/questions/12868366/android-x86-emulator-not-respecting-vm-heapsize

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!