有没有办法强加给Android应用程序进行测试的内存限制? [英] Is there a way to impose a memory limit on an Android app for testing?

查看:261
本文介绍了有没有办法强加给Android应用程序进行测试的内存限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找类似JVM堆内存限制选项-Xmx的东西。有一个简单的方法来做到这在Android?

I'm looking for something similar to the JVM heap memory limit option -Xmx. Is there a simple way to do this on Android?

推荐答案

如果您使用的是仿真器,你可以在创建AVD时指定的 VM堆参数。这就是内存标准的应用程序都提供。

If you're using an emulator, you can specify the VM Heap parameter when creating the AVD. That's the memory that standard apps will have available.

如果它是一个真正的设备,但是,我不认为这个参数是可以改变的(至少在非根深蒂固的一个)。

If it's a real device, however, I don't think this parameter can be changed (at least on a non-rooted one).

这篇关于有没有办法强加给Android应用程序进行测试的内存限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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