Android Monitor provides a memory monitor, so you can monitor application performance and memory usage very easily, can find useless objects, local memory leaks, and connect devices to RAM usage. Memory monitor shows how your app allocates RAM and shows it visually:
1. Display a graph of available and allocated Java memory based on time
2. Show garbage handling events according to time
3. Initialize Garbage handling events
Memory Monitor Workflow
To detect and optimize your memory usage, a typical workflow is to run your app and do the following:
1. Use the memory monitor to check the application to see if garbage processing is impacting performance.
2, if you see a lot of garbage collection events in a short time, you can carry out related analysis
3. Start assigning traces to determine if your code is having problems.
Show a running application in memory monitor
The following steps will run to view the app in a specific device or virtual machine:
1. Open a project
2. Run the application in a physical device or virtual machine
3. Display Android Monitor
4. Click on the Monitors tab and display the memory Monitor
This article Song Zhihui
Personal Weibo: Click to enter
6.2. Android Studio Memory