android - Android中每个进程需要2MB内存?

标签 android memory

我正在阅读这篇关于如何构建更高效的 Android 应用程序的精彩文章:http://blog.azoft.com/android-application-development-tips/ .

这些提示确实很有帮助。但我不太确定这个:

由于每个进程需要 2MB,并且当前台应用程序需要内存时可能会重新启动,因此请确保服务是短暂的。”

Android 中每个进程都需要 2 MB 内存,这是真的吗?

最佳答案

根据https://developer.android.com/training/articles/memory.html :

Before you decide to create a new process, you need to understand the memory implications. To illustrate the consequences of each process, consider that an empty process doing basically nothing has an extra memory footprint of about 1.4MB, as shown by the memory information dump below.

从基本上什么都不做到做任何有用的事情的 1.4MB,额外 600k 达到 2MB 似乎是合理的。

另请参阅:Is there a minimal heap size for Android versions?

关于android - Android中每个进程需要2MB内存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31523217/

相关文章:

android - "?attr/colorPrimary"的值

android - AndEngine - SpriteGroup 在新的 attachChild 上闪烁

ios - ios:读取大文件时的内存使用情况

java - 以编程方式增加java中的CPU使用率和内存使用率

python: 可变对象的 id() - 解释有趣的模式?

php - 网页链接管理 - php 与数据库

android - 为一周中的特定日子重复闹钟android

Android - ActionBarSherlock - 设置子菜单中文本的文本颜色

Android 设计库 23.1.0 NavigationView

c++ - 泄漏的内存是否会在 C/C++ 程序运行期间始终丢失?