Though I never made a formal announcement here, some of you may know that I joined the Android team at Google just over a year ago. Last week I had the privilege of speaking at Google I/O in a talk called “Memory Management for Android Applications”:
Android apps have more memory available to them than ever before, but are you sure you’re using it wisely? This talk will cover the memory management changes in Gingerbread and Honeycomb (concurrent GC, heap-allocated bitmaps, “largeHeap” option) and explore tools and techniques for profiling the memory usage of Android apps.
You can watch a full video of the talk (including the Q&A) on YouTube:
You can also download the slides (PDF).
ERRATUM: I’d like to correct one mistake I made in the Q&A, answering a question at 49:33 in the video. I said that “garbage collection is fundamentally kind of asynchronous; if you’re really close to the limit there can be times that you’re trying to allocate so fast that the garbage collector can’t keep up.” That isn’t really true. Dalvik will always perform a full, synchronous GC before thowing an OutOfMemoryError. What I was referring to here was finalization. Finalization is asynchronous, so if you are close to your heap limit and allocating a lot of objects, you may run out of memory before finalizable objects can be freed.
Anyways, I had a great time at Google I/O, and met all kinds of developers building cool stuff on Android. Hope to see you all again next year!