article

Amelia@Amazon avatar image
Amelia@Amazon posted

ART stack allocation causing StackOverflow issues

Summary

Applications using native and Java components could potentially crash due to ART unifying the stack allocated to an app. From the Verifying App Behavior on the Android Runtime guide at: http://developer.android.com/guide/practices/verifying-apps-art.html, the ART stack size should be the same as it was on Dalvik. However, you will want to validate to make sure that you are verifying that your threads have the appropriate thread sizes.

It would also become even more important to work on managing your app's memory allocation. Which, Google has a good guide for how to manage your memory on the Java side of your app at:https://developer.android.com/training/articles/memory.html

In addition, a compacting Garbage Collector is in development for the AOSP project, and as such, this will help alleviate issues where your OutOfMemoryError is really a "there is enough memory, but it isn't contiguous" error. Google also has a video discussing the improvements made for the ART runtime, Garbage Collection improvements under ART, and other changes.

https://www.youtube.com/watch?v=EBlTzQsUoOw&feature=youtube_gdata

Keywords: Stack Overflow, Crashes, ART

KB_0007

androidlollipop
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Article

Contributors

wangchao contributed to this article brizzlebrazzle contributed to this article