Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You can use DDMS to monitor memory allocated by a specific Android application. The memory allocation statistics are updated on demand by the developer. Follow these steps to track memory allocations:
1. On the emulator or device, verify that the application you want to monitor is running.
2. In DDMS, find that application’s package name in the Devices pane and highlight it.
3. Switch to the Allocation Tracker pane on the right pane.
4. Click the Start Tracking button to start tracking memory allocations and the Get Allocations button to get the allocations at a given time.
5. To stop tracking allocations, click the Stop Tracking button.
For example, in Figure B.5, we see the Allocation Tracker pane contents for an application running on the emulator.