有没有办法设置iPhone模拟器中可用的内存量? [英] Is there a way to set the amount of memory available in the iPhone Simulator?

查看:117
本文介绍了有没有办法设置iPhone模拟器中可用的内存量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道它是否可以设置模拟器中可用的内存量?

Does anyone know if its possible to set the amount of memory available in the simulator?

我假设模拟器将使用尽可能多的内存来自系统,但这使得重新创建某些低内存崩溃/错误更加困难。

I'm assuming the simulator will use as much memory as possible from the system but this makes it more difficult to recreate certain low memory crashes/bugs.

推荐答案

不可能。

应该在设备而不是模拟器上测试内存消耗和性能等内容。即使您可以限制模拟器中的内存,也不会获得相同的效果,因为有很多不同的因素会决定任何给定的iPhone设备目前可用的内存量。

Testing things like memory consumption and performance should be done on the device, not the simulator. Even if you could limit the memory in the simulator you wouldn't get the same effect as there are very many different factors that will dictate how much available memory any given iPhone device will currently have.

您可以模拟内存警告来测试您对该警告的响应是否正常,但除此之外,您应该在物理设备上测试此类内容。

You can simulate a "memory warning" to test if your responses to that warning behave correctly, but other than that, you should really be testing this kind of thing on a physical device.

这篇关于有没有办法设置iPhone模拟器中可用的内存量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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