Why can't I boot an AVD from Eclipse with 1024 MB of RAM?

14,774

Solution 1

From Galaxy s3 emulator:

There is a common problem when setting up the AVD that you have to manually edit the config file to fix. File is located at C:\Documents and Settings\username\.android\avd\name_of_avd.avd\config.ini

Change the memory settings from

hw.ramSize=1024

to

hw.ramSize=1024MB

(Do not enable word wrap in notepad).

Save the file and reopen the avd. This worked for me.

Solution 2

Weird, but this worked for me on Windows 7 x64 machine with 16GB of RAM. You do have to add MB at the end of "hw.ramSize" in config.ini. I had the same problem like OP wrote. Also, if you need 2 gigabytes of RAM, write 2048MB and simulator will run from Eclipse.

Share:
14,774
Tom Kidd
Author by

Tom Kidd

iOS developer

Updated on August 01, 2022

Comments

  • Tom Kidd
    Tom Kidd almost 2 years

    So, like a lot of people starting Android development with Eclipse, even with a fast machine, I notice that the emulator runs frustratingly slow.

    I search SO for any tips to make it run faster and I run across this question, whose top answer suggests a couple of things, including making the AVD have more RAM. They suggest 1024MB:

    enter image description here

    Sounds good. But when I try to launch it, I get this:

    Failed to allocate memory: 8
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.
    

    If I set it to 512MB (up from the default 256MB) it launches fine.

    But why, on a Windows 7 x64 machine with 12GB of physical RAM can I not allocate 1024MB to an AVD? Is it an Eclipse limitation? Emulator limitation? Java limitation? I presume the person in that other question got it working but I've yet to figure out how and most of the responses I see elsewhere say "yeah dial it down to 512MB" which is not the answer I'm looking for.

  • Chris Stratton
    Chris Stratton almost 11 years
    Note: in a now deleted answer (which should have been converted to a comment here rather than simply deleted), user2271132 suggested that it might need to be "1024M" rather than "1024MB". I have not confirmed this but wanted to add that idea to the record where everyone can see it.