在不同的手机/设备和操作系统版本的Andr​​oid堆大小 [英] Android heap size on different phones/devices and OS versions

查看:187
本文介绍了在不同的手机/设备和操作系统版本的Andr​​oid堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道,如果Android手机上堆的大小是一个恒定值,根据是什么在操作系统版本设置,或者如果这是手机生产商可以决定?设置

时堆的大小成正比RAM的手机?

上的金额

我只发现文章里的人说,一个应用程序的堆大小为16M。然而,这些文章都有点老了。从我所看到的,作为一个例子,堆大小从大约20M至24M在一个特定的型号而异。这款手机拥有768M RAM

解决方案
  

有谁知道,如果Android手机上堆的大小是一个恒定值,根据是什么在操作系统版本设置,或者如果这是手机生产商可以决定?设置

从技术上讲,它是一种在电话生产者可以决定一个设置。 Android是开源的。我不记得的兼容性定义文件列明堆大小的要求,虽然我最近没有看。

  

时堆的大小成正比RAM的手机?

上的金额

没有,也容易在屏幕分辨率是基于更多的,更高分辨率的屏幕往往要处理更大的位图,因此谷歌使堆大小的建议是,希望设备制造商将遵守。

  

我只发现文章里的人说,一个应用程序的堆大小为16M。

搜索计算器[机器人]堆大小变成了<一href="http://stackoverflow.com/questions/2630158/detect-application-heap-size-in-android/2634738#2634738">this回答。

Does anyone know if the heap size on Android phones is a constant value according to what is set in the OS version or if this is a setting which the phone producers can decide on?

Is the heap size proportional to the amount of RAM on the phone?

I've only found articles where people say that the heap size of an application is 16M. However, these articles are a bit old. From what I see, as an example, heap sizes vary from around 20M up to 24M on one specific model. This phone has 768M of RAM.

解决方案

Does anyone know if the heap size on Android phones is a constant value according to what is set in the OS version or if this is a setting which the phone producers can decide on?

Technically, it is a setting which the phone producers can decide on. Android is open source. I do not recall the Compatibility Definition Document spelling out heap size requirements, though I haven't looked recently.

Is the heap size proportional to the amount of RAM on the phone?

No, it tends to be based more on screen resolution, as higher-resolution screens tend to want to manipulate larger bitmaps, so Google makes heap size recommendations that, hopefully, device manufacturers will abide by.

I've only found articles where people say that the heap size of an application is 16M.

Searching StackOverflow on [android] "heap size" turns up this answer.

这篇关于在不同的手机/设备和操作系统版本的Andr​​oid堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆