问题描述
活动监视器(a.k.a. Memory Monitor)是Xcode Instruments中唯一能够测量在Simulator中运行的iPhone应用程序的应用程序内存总量的工具吗?只是显示瞬间有线RAM的那一行?
Is Activity Monitor (a.k.a. Memory Monitor) the only tool in Xcode Instruments that can measure the total app RAM usage of an iPhone app running in Simulator? Just that line showing momentary wired RAM?
这与iPhone硬件有多准确,特别是考虑到OSX对VM的分页i / o?
And how accurate is that versus iPhone hardware, especially given OSX paging i/o to VM?
我看到7-8MB的有线RAM数据仅用于编译和运行的默认Xcode iPhone项目模板(OpenGL除外)。与此同时,对象分配显示所有对象都低于1MB。
I'm seeing 7-8MB wired RAM figures for just the default Xcode iPhone project templates (other than OpenGL) compiled and running. At the same time Object Allocations shows well under 1MB for all objects.
推荐答案
不,有更好的方法可以做到这一点。
Nope, there's a much better way to do it.
转到运行菜单并选择使用Performance Tool运行
然后对象分配
。
Go to the Run menu and select Run with Performance Tool
then Object Allocations
.
这将启动Instruments并显示RAM使用情况。如果您选择 Leaks
而不是对象分配
,它对于检测内存泄漏也很有用。
This will start Instruments and will show RAM usage. It's also useful for detecting memory leaks if you choose Leaks
instead of Object Allocations
.
这篇关于Xcode Instruments:在Simulator中运行的iPhone应用程序的峰值RAM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!