可以分配到一个Android应用程序的最大本机内存 [英] Maximum native memory that can be allocated to an android app

查看:122
本文介绍了可以分配到一个Android应用程序的最大本机内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据手机上的虚拟机堆的大小不能超过16MB,24MB,32MB。 但是,什么是本机堆的最大尺寸是多少?多少机内存可以被分配给应用程序,当它在前台

The size of the VM heap cannot exceed 16mb, 24mb, 32mb depending on the phone. But what is the maximum size of the native heap? How much native memory can be allocated to the app when it is in foreground.

感谢。

推荐答案

在技术上有一个在NDK没有限制。 <一href="http://stackoverflow.com/questions/3039369/how-much-is-too-much-memory-allocation-in-ndk">Someone问这个而回,被称为<一个href="http://groups.google.com/group/android-ndk/browse_thread/thread/95c9f0cecceb112a/ab033b9a28d52fcd?lnk=gst&q=heap%20limit&pli=1"相对=nofollow>这个Android的NDK组线程。一个相应和报价:

Technically there's no restriction in the NDK. Someone asked this a while back and was referred to this android-ndk Groups thread. A relevent quote:

也考虑到这是NDK列表,限制实际上是   不是强加给你,因为这是只在Java堆。上有没有限制   分配在本地堆......

"Also given that this is the NDK list, the limit is actually not imposed on you, because it is only on the Java heap. There is no limit on allocations in the native heap..."

戴安娜Hackborn

Dianne Hackborn

她不会去说,它不应该被滥用,如果它是不是应用可以被杀死。

She does go on to say that it shouldn't be abused and if it is than applications could be killed.

这篇关于可以分配到一个Android应用程序的最大本机内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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