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

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

问题描述

是否有一种简单的方法可以模拟模拟器内的低内存?我有兴趣执行类似于 这篇文章

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天全站免登陆