Android的Java中,获得更多的允许的内存使用情况 [英] Android java, get more allowed memory usage

查看:97
本文介绍了Android的Java中,获得更多的允许的内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造这个游戏的Andr​​oid和我对内存使用的几个问题。当我们被我们的无知之内的编码,我们有我们的应用程序使用40MB左右的内存,但认为做了一个测试手机死机(的Xperia ARC(什么东西,东西)),其中又以内存不足。然后,我们$ C $光盘,它聪明的内存,得到了约20万桶。我们有很多的一派,我们已经看到了人民张贴的大多数手机都限制在16 MB和其他32 MB。但我们也像愤怒的小鸟,它使用的是约129内存(其中的的Xperia弧崩溃超过32 MB与我们的应用程序正常工作)的其他应用程序进行比较。

I am creating this game for android and I have a few question about memory usage. When we were coding within our ignorance we had our app using about 40mb memory but that made a test phone crash (Xperia Arc (something, something)) which went out of memory. We then coded it smarter with the memory and got to about 20 mb. We have googled alot and we've seen peoples posting that most mobile phones are limited to 16 mb and others 32 mb. BUT, we've also compared with other applications like angry birds, which are using about 129 memory (which works fine on the Xperia arc that crashes over 32 mb with our app).

我的问题是,则:我们可以以某种方式得到使用更多的内存比16位/ 32 MB或如何使用的方式应用更多呢?

My question is then: can we somehow get to use more memory than 16 / 32 mb or how does the apps that uses way more do?

有人说你可以,如果真的使用其他进程来处理内存,并得到另一个16位/ 32 MB该进程。请问,对于一个一般的程序员是可行的?

Some people says that you can use other processes to handle memory and get another 16 / 32 mb for that process, if that true. Would that be doable for an average programmer?

推荐答案

把这个在你的表现为应用程序的属性。

put this in your manifest as application's attribute

android:largeHeap="true"

的人谁都会像我一样在寻找答案的快速

for someone who will be looking for fast answer like me

这篇关于Android的Java中,获得更多的允许的内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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