我对运行Android姜饼和冰淇淋三明治(cyanogen CM9)的galaxys2(arm exynos4)设备进行了比较/ proc / meminfo。我注意到内核在低内存和高内存之间以不同方式分割内存:
对于ICS / CM9(3.0内核):
cat /proc/meminfo:
MemTotal: 843624 kB
MemFree: 68720 kB
Buffers: 1532 kB
Cached: 115720 kB
SwapCached: 0 kB
Active: 487780 kB
Inactive: 64524 kB
Active(anon): 436316 kB
Inactive(anon): 1764 kB
Active(file): 51464 kB
Inactive(file): 62760 kB
Unevictable: 748 kB
Mlocked: 0 kB
**HighTotal: 278528 kB**
HighFree: 23780 kB
**LowTotal: 565096 kB**
LowFree: 44940 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 435848 kB
Mapped: 45364 kB
Shmem: 2276 kB
Slab: 37996 kB
SReclaimable: 10028 kB
SUnreclaim: 27968 kB
KernelStack: 10064 kB
PageTables: 16688 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 421812 kB
Committed_AS: 8549052 kB
VmallocTotal: 188416 kB
VmallocUsed: 104480 kB
VmallocChunk: 26500 kB
对于GB(2.6内核):
cat /proc/meminfo:
MemTotal: 856360 kB
MemFree: 22264 kB
Buffers: 57000 kB
Cached: 337320 kB
SwapCached: 0 kB
Active: 339064 kB
Inactive: 379148 kB
Active(anon): 212928 kB
Inactive(anon): 112964 kB
Active(file): 126136 kB
Inactive(file): 266184 kB
Unevictable: 396 kB
Mlocked: 0 kB
**HighTotal: 462848 kB**
HighFree: 1392 kB
**LowTotal: 393512 kB**
LowFree: 20872 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 324312 kB
Mapped: 97092 kB
Shmem: 1580 kB
Slab: 29160 kB
SReclaimable: 13924 kB
SUnreclaim: 15236 kB
KernelStack: 8352 kB
PageTables: 23828 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 428180 kB
Committed_AS: 4001404 kB
VmallocTotal: 196608 kB
VmallocUsed: 104804 kB
VmallocChunk: 57092 kB
我注意到在3.0内核上内存压力很明显,并且经常调用内存不足。
我有两个问题:
答案 0 :(得分:1)
据我所知,高内存和低内存之间的分割是内核的编译参数,因此应该可以不同地设置它(在编译时)。我不知道为什么你的例子中的高内存区域有这么多。在具有1 GB物理RAM的x86上,低内存大约为896 MB,高内存大约为128 MB。
Android似乎需要比典型的32位x86桌面更高的内存,我不知道Android回声系统的哪些功能会带来这样的要求,所以希望其他人可以告诉你。 / p>
您可以尝试调查内存区域,以尝试查看Android ICS和GB之间的区别。只需做一个cat /proc/zoneinfo
。您可以找到一些背景information on these zones in this article,但要注意它是针对x86 arch描述的。