如何限制RAM以测试内存不足的情况? [英] How do I limit RAM to test low memory situations?

查看:150
本文介绍了如何限制RAM以测试内存不足的情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试重现似乎在用户用完一堆RAM时出现的错误.限制计算机可以使用的可用RAM或填满其中的最佳方法是什么?我更愿意这样做,而不需要物理上删除内存,也不需要运行一堆任意的,占用大量内存的程序(例如,Photoshop,Quake等).

I'm trying to reproduce a bug that seems to appear when a user is using up a bunch of RAM. What's the best way to either limit the available RAM the computer can use, or fill most of it up? I'd prefer to do this without physically removing memory and without running a bunch of arbitrary, memory-intensive programs (ie, Photoshop, Quake, etc).

推荐答案

使用虚拟机并在虚拟机上设置资源限制以模拟所需的条件.

Use a virtual machine and set resource limits on it to emulate the conditions that you want.

VMWare是该领域的领导者之一,他们有一个免费的vmware播放器,让您做到这一点.

VMWare is one of the leaders in this area and they have a free vmware player that lets you do this.

这篇关于如何限制RAM以测试内存不足的情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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