如何在Android模拟器模拟内存不足? [英] How do you simulate low memory in the Android emulator?

查看:1355
本文介绍了如何在Android模拟器模拟内存不足?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种简单的方法来模拟仿真器内部内存不足? 我很感兴趣地执行资源清理类似于<一href="http://groups.google.com/group/android-developers/browse%5Fthread/thread/59b726243404440b/720d28bd1bc3fcee">this帖子

Is there an easy way to simulate low memory inside the emulator ? I'm interested to perform resource cleanups similar to this post

推荐答案

调用 的ulimit 从shell 命令。

Invoke ulimit command from the shell.

ulimit -Sv 10000

这将设置当前内存限制10 000 KB,因此,从这个shell调用的所有应用程序之后将不能够访问更多的内存。

This will set current memory limit to 10 000 Kb, so that all apps invoked from this shell afterwards won't be able to access more memory.

这篇关于如何在Android模拟器模拟内存不足?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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