8

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.

Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122
user965980
  • 187
  • 7

1 Answers1

5

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 3
    I believe the code you cite didn't end up getting activated, mainly because it didn't seem to help significantly in practice, and IIRC it could confuse debuggers. – danfuzz Jun 26 '12 at 05:24
  • @danfuzz: Thanks for the info! It's great to get expert info on these sorts of details. – CommonsWare Jun 26 '12 at 10:37