Xcode Instruments: peak RAM of iPhone apps running in Simulator?

MemoryFoam picture MemoryFoam · Jan 28, 2010 · Viewed 9.6k times · Source

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?

And how accurate is that versus iPhone hardware, especially given OSX paging i/o to VM?

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.

Answer

David Kanarek picture David Kanarek · Jan 30, 2010

Nope, there's a much better way to do it.

Go to the Run menu and select Run with Performance Tool then Object Allocations.

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.