skip to Main Content

I have an Android emulator setup in my CI server. I notice that when I boot it up with more than 4GB of RAM eg.

emulator -avd myEmulator -m 6144

, a warning message appears:

pc_memory_init: above 4g size: 4000000

When I check my RAM size using adb, it is fell back to 4GB.

How to allocate more than 4GB for the emulator ?

2

Answers


  1. Chosen as BEST ANSWER

    It turns out that using this command line after emulator is booted:

    adb shell “cat /proc/meminfo”
    

    I'm able to see that the RAM size allocated for emulator is exactly what I put in the command line:

    emulator -avd myEmulator -m ${RAM_SIZE}
    

  2. You can adjust your memory settings used by the android studio as well as the emulators using the settings provided below.

    Settings option

    Adjust the settings

    Adjust your memory settings as per your requirements.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search