Table of contents
The maximum memory available to a single application
Out of memory OOM
The maximum memory available to a single application
dalvik.vm.heapstartsize , which represents the initial size of the heap allocation.
dalvik.vm.heapgrowthlimit , which represents a single process memory limit.
dalvik.vm.heapsize , the maximum memory available to a single process.
When heapgrowthlimit is defined , its value is used to limit the memory value of a single process. Usually the heapsize value will be greater than the heapgrowthlimit value. When setting the value of heapgrowthlimit is not enough, we can add "android:largeHeap=true" in the manifest file (AndroidManifest.xml) file to use the value of heapsize.
Common causes of OOM
1. Load large images
2. Memory leak
java exception system
Memory real-time monitoring
JPDA
The Java platform debugging system JPDA (Java PlatformDebugger Architecture), which is a set of interfaces specially provided by the Java virtual machine for debugging and monitoring the virtual machine .
JVMTI is the interface exposed by the JVM, and JDI is the client that implements the JDWP communication protocol, through which the debugger communicates with the debugged program in the JVM.
Important features of JVMTI
redefine class
Track object allocation and garbage collection process
Follow the object's reference tree and traverse all objects in the heap
Detect Java call stack
suspend (and resume) all threads
ART YOU
ART (Android Runtime). In Android 8.0 and higher, the ART Tool Interface (ART TI ) provides some runtime internal architectural information and allows splitters and debuggers to affect runtime behavior of apps, which can be used to achieve state-of-the-art performance tool .