Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the android dalvik vm use escape analysis optimization?

Any ideas about escape analysis in dalvik? Or when and if it's planned to be added?

I consider escape analysis a very important feature in GC languages to avoid churning out objects every time a method is called, and currently I preallocate an object in the class and reset it at the beginning of the method, so I avoid allocation (I am writing 3D games for android...in java), but I find this method ugly and keeps the memory hogged with preallocated objects.

like image 338
user965980 Avatar asked Jun 24 '12 11:06

user965980


1 Answers

Any ideas about escape analysis in dalvik?

There is source code in the dx portion of the Dalvik project that performs some limited escape analysis. Whether this is actually used in production, I cannot say, and the topic certainly does not seem to come up very much.

Or when and if it's planned to be added?

Google does not make much in the way of forward-thinking statements regarding Android's capabilities.

like image 111
CommonsWare Avatar answered Nov 12 '22 07:11

CommonsWare