Android Memory Optimization -2-oom Research

Source: Internet
Author: User

Why is there an oom?each process of Android app or each virtual machine (a process a virtual machine) has the maximum memory limit (different phone/version limits), and if the application requests more memory than the limit, the system throws an Oom exception. This whole device figure memory doesn't matter. Older Android system a virtual machine up to 16M of memory, when an app starts, if the virtual machine keeps requesting memory resources to load the picture, eventually oom.This is the maximum memory that the virtual machine can request, and the /system/build.prop file can be viewed for the memory size limit of the heap heap.Why is there a limit? 1. Prevent the program from maliciously using too much memory, 2. The screen is so large and realistic information is limited, most of the data is prepared for display state, without allocating memory.a simple approach to preventing oom1. Null for unused objects2. Do not use the Picture object to call its recycle () method.
How to view app memory allocations1. View through the heap view in Ddms.

http://my.eoe.cn/808632/archive/5535.html


From for notes (Wiz)

Android Memory Optimization -2-oom Research

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.