Friday, May 13, 2011

Memory debugging and Android application

Using DDMS

*. Compile & run the application on an enumlator in debug (e.g. Manifest.xml, android:debuggable="true").
*. open DDMS

Checking the heap status:
*. Select your application, click on 'Show heap updates' on the toolbar.
*. Play around with your application and check the results.

Checking the allocations:
*. Select the allocation tracker tab, click on 'Start Tracking'
*. Press 'Get Allocations' when you want to check the allocations.

Note: do not use both heap status & allocations - the heap monitoring will cause a lot of allocations.

No comments: