XCode Instruments 6(到目前为止)未反映正确的内存量 [英] XCode Instruments 6 (by far) not reflecting the correct amount of memory

查看:61
本文介绍了XCode Instruments 6(到目前为止)未反映正确的内存量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在XCode调试面板中显示的已用内存量与Instruments中的相同信息之间存在巨大差异. 当Instruments仅显示42MB时,XCode显示400 MB的已分配内存.我肯定比42接近400,因为我加载了32MB的倍数纹理...(这一次,42不是答案,顺便说一句)

I've a huge difference between the amount of used memory displayed in XCode debug panel and the same info in Instruments. XCode shows 400 MB of allocated memory when Instruments only shows 42MB. I'm certainly closer to 400 than 42 as I've multiples 32MB textures loaded... (And this time, 42 is not the answer, btw)

XCode 6.0.1,iPad 3,iPhone 5S,iOS 7.1.2都可以,可以在真实设备上进行性能分析,但是在模拟器上做同样的事情没问题.

XCode 6.0.1, iPad 3, iPhone 5S, iOS 7.1.2 on both, Profiling on real devices, but no problem doing the same thing on simulator.

跟踪内存消耗的理想情况.

Not an ideal situation to track memory consumption.

出了什么问题?我错过了什么?我过滤所有分配"和所有堆和匿名". 任何的想法 ?谢谢

What goes wrong? Did I miss something? I filter on "All allocations" and "All heap and anonymous". Any idea ? Thx

推荐答案

分配"工具不记录OpenGL ES纹理内存分配.如果您的应用程序分配了32 MB的多个纹理,则可以解释为什么Xcode报告的内存使用量为400 MB,而分配"工具报告的容量为42 MB.

The Allocations instrument doesn't record OpenGL ES texture memory allocations. If your app is allocating multiple 32 MB textures, that would explain why Xcode is reporting memory usage of 400 MB and the Allocations instrument is reporting 42 MB.

使用OpenGL ES Analysis模板查看纹理内存分配.使用分配"工具查看应用程序的其余内存分配.

Use the OpenGL ES Analysis template to look at your texture memory allocations. Use the Allocations instrument to look at the rest of your app's memory allocations.

这篇关于XCode Instruments 6(到目前为止)未反映正确的内存量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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