Debug.getNativeHeapSize()
will do the trick, I should think. It's been there since 1.0, though.
The Debug
class has lots of great methods for tracking allocations and other performance concerns. Also, if you need to detect a low-memory situation, check out Activity.onLowMemory()
.