Amelia@Amazon avatar image
Amelia@Amazon posted

ART stack allocation causing StackOverflow issues


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:, 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:

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.

Keywords: Stack Overflow, Crashes, ART


10 |5000

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



wangchao contributed to this article brizzlebrazzle contributed to this article