programing

Failed to allocate memory: 8

powerit 2023. 7. 27. 22:24
반응형

Failed to allocate memory: 8

From today, when I tried to run an app in NetBeans on a 2.3.3 Android platform, it shows me that:

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.

and the Emulator doesn't want to start.

This is for the first time when I see it, and google has no asnwers for this, I tried even with 2 versions of NetBeans 6.9.1 and 7.0.1, still the same error.

I figured it out. The problem was in the amount of ram I had specified for the virtual machine, and it was 1024MB, now I have 512MB and it is ok, now I need to find how to improve this amount of ram, 512 is not so much, and the machine is a little bit laggy.

Referring to Android: failed to allocate memory and its first comment under accepted answer, changing "1024" to "1024MB" helped me. Pathetic, but works.

In my case:

  • Using built in WXGA720 to simulate 720p device, always got this error
  • Manually set AVD resolution to 720 x 1280, works for me

hope it helps~

Everything else you read here and elsewhere is pure conjecture. The only sure-way to fix this problem is vote for this bug report.

The problem isn't related to emulator resolution or OpenGL, nor how much memory your computer has. I've got 24GB memory in my computer and most of the time I run with hw.ramSize=1024 I get error 8. Other times it works just fine without any configuration changes. I hope you caught that: I did not alter the emulator configuration at all and yet sometimes it runs and sometimes it fails.

There is a high probability it has something to do with memory fragmentation. I recommend reducing the value of hw.ramSize as a temporary workaround.

Works with 512 Mb instead. None of the above methods works for me.

Looks like there are a thousand different fixes for this...none of the above worked for me, but what worked was to launch the AVD from the command line emulator-arm.exe @AVD-NAME

Somehow if launched with only emulator.exe, I would get the same error message than when trying to launch via Eclipse.

이 문제에 대한 해결책은 애플리케이션을 정상 모드로 실행할 때 이클립스 메모리 할당에서 비롯된다는 것을 깨달았습니다.방금 Eclipse의 바로 가기 속성 아래에 있는 "Run as Administrator" 상자를 확인했는데 이제 AVD에 더 많은 메모리를 할당할 수 있습니다.

도움이 되길 바랍니다.

저는 기기 화면 크기를 변경하여 이 문제를 극복했습니다.

1024 mb ram을 지정하는 경우 장치 화면 크기를 hdpi로만 지정해야 하고 512 mb ram이면 mdpi 또는 기타로 지정해야 한다는 것을 알게 되었습니다.

따라서 화면 크기에 따라 RAM 크기를 지정해야 한다고 말할 수 있습니다. 장치 화면 크기를 mdpi로 유지하면서 1024 RAM 크기를 지정하면 위에서 언급한 오류가 발생합니다. 즉, "Failed to allocate memory: 8 이 응용 프로그램은 런타임에 비정상적인 방법으로 종료하도록 요청했습니다.

자세한 내용은 해당 애플리케이션의 지원 팀에 문의하십시오.

또는

다음과 같이 AVD Manager에서 옵션을 만듭니다.

[2013-01-11 14:44:01 - SDK Manager] hw.dll.orientation=yes

[2013-01-11 14:44:01 - SDK Manager] hw.camera.front=discard

[2013-01-11 14:44:01 - SDK 매니저] hw.sk=yes

[2013-01-11 14:44:01 - SDK Manager] skin.dynamic=아니오

[2013-01-11 14:44:01 - SDK 매니저] hw.sk=no

[2013-01-11 14:44:01 - SDK Manager] vm.heapSize=32

[2013-01-11 14:44:01 - SDK Manager] hw.ramSize=343

저는 이 스레드에 언급된 다른 솔루션들을 모두 살펴보았지만 작동하는 것을 찾지 못했기 때문에 주변을 조금 둘러보았습니다.Google 버전의 API가 어떤 이유로 인해 실패했습니다.바닐라로 다시 바꿨고 더 이상 충돌하지 않습니다.

다른 문제가 있긴 한데 도움이 될지도...

공식적인 33930호를 보세요.에뮬레이터 시작 중 OpenGL 시작과 관련이 있을 수 있다는 지적이 있습니다.다른 사람들은 WXGA800-skin을 사용할 때만 충돌한다고 쓰고 해상도를 수동으로 800x1280으로 설정할 것을 제안했습니다.

또한 Android SDK를 버전 19로 수동으로 다운그레이드할 수 있는 ZIP 파일과 플랫폼 도구를 버전 11로 다운그레이드할 수 있습니다.이렇게 하면 일시적으로 문제를 해결하는 데도 도움이 될 수 있습니다.

I have 16 GB and a 3.4 Ghz quad core proc in my machine. The virtual machine won't let me run it at 1024 either. I did bump it up to 878MB because it failed at 880 with the same message. This seems to be the most ram I can allocate to the emulator. It is still slow but I'm assuming it is better than 512MB.

I change my monitor DPI settings from the launch options of AVD and synchronized it with the original and current setting of my monitor, and it worked.

I solved by put as storage size 2 times the RAM size, and by putting the SD storage size the same as RAM size.

I had the same issue but before I got the issue it asked me to capture a video source.

I disabled the camera support and I was able to use 1024MB of RAM.

Using Windows 64bit, Xoom (Android 3.0).

In my case, changin screen resolution from WVGA720 to WSVGA works for me.

The problem is in memory fragmentation. OS have to allocate all the ram you specified for vm ( say 1Gb) as one continuous block. Sometimes there is no such block. To fix it close running programs, then run avd and start your virtual machine.

What worked for me on Windows was:

1) Closing Eclipse 2) Running Avd UI 3) Closing all running processes, especially ones that are heavy in memory, like Chrome, explorer.exe, etc 4) Start the emulator 5) Win

Be sure that IntelHAXM is installed correctly. It's not enough to download and "install" it through the SDK Manager. You need to manually install it from:

android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager

Also, be sure that Intel Virtual Technology is enabled in your BIOS.

Follow the guide on developer.android.com or Intel's installation instructions.

You only need to edit your virtual device's ram, making it lower! Try 20 MB, and it will work!

I noticed it was related to just one avd all the rest of the ones I have worked fine. I deleted it and created a new one and now it works.

ReferenceURL : https://stackoverflow.com/questions/7222906/failed-to-allocate-memory-8

반응형