iPad:活动监视器的“真实内存” v. 应用程序内存使用情况?
我正在帮助一位朋友解决他编写的 iPad 应用程序中的崩溃问题。该应用程序非常简单,当用户在页面中前进和后退时,在单个 UIViewController 下的 UIView 之间进行转换。崩溃非常严重,并且不会让我们进入调试器或其他任何地方 - 应用程序只是死了。在控制台中,发布了臭名昭著的“信号“0””消息,根据
内存分配非常恒定,远低于设备施加的任何限制:
根据分配和泄漏检测,分配总数最大约为 2MB 左右 - 远低于任何硬件/操作系统限制。然而,当我们使用 Activity Monitor 工具在设备上运行应用程序时,应用程序使用的实际内存达到了 150MB 左右,我们怀疑这是操作系统导致应用程序终止的原因。
是什么导致了这两个数字之间的明显差异?
I am helping a friend hunt down a crash in an iPad application he has written. The application is pretty straightforward, transitioning between UIView
s under a single UIViewController
as the user goes forward and backwards through pages. The crash is pretty hard, and doesn't drop us in the debugger or anything- the app just dies. In the console the infamous 'signal "0"' message is posted, which according to this question is most likely due to the OS killing the app over memory consumption.
The memory allocations are pretty constant, well below any limits imposed by the device:
According to the Allocation and Leaks instruments the total number of allocations maxes out around 2MB or so- well below any hardware/OS limits. However when we run the app on the device with the Activity Monitor instrument the Real Memory used by the application is topping out around 150MB, which we suspect to be the cause of the application's death by the OS.
What is to account for the glaring discrepancy between these two figures?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于某种原因,
[UIImage imageNamed:]
无法正确缓存。切换到另一个 API 来加载图像解决了该问题。For some reason
[UIImage imageNamed:]
wasn't caching properly. Switching to another API to load the images resolved the issue.