One, what is Oom
(1) Start with the definition first:
Common bad code in Android (Java) prone to memory leaks
Android is primarily used in embedded devices, and embedded devices are usually not highly configurable due to some well-known conditions, especially when memory is relatively limited. If we write code that has too much memory usage, it will inevitably make our device run slowly, or even crash. To enable Android apps to run safely and quickly, each Android application uses a proprietary Dalvik virtual machine instance that is hatched by the zygote service process, which means that each application runs in its own process. On the one hand, if the program in the process of running a memory leak problem, will only make their own process is killed, and will not affect other processes (if it is system_process and other system process problems, it will cause a system restart). On the other hand, Android allocates different memory usage caps for different types of processes, and if the application process uses more memory than this limit, it is considered a memory leak by the system and is killed.
(2) The conclusion is that the memory is not enough to call Oom.
Android device memory is generally relatively small, easy to cause oom.
Android each application runs in a proprietary Dalvik virtual machine instance, and Android allocates fixed memory. Out of allocated memory, causing oom, System kill, program end.
Android system process Oom, machine restarted.
Android face Test