★ TouchArcade needs your help. Click here to support us on Patreon.

How to measure RAM usage?

02-13-2009, 06:02 AM
#1
Joined: Sep 2008
Location: Birmingham, UK, dull corner of the world
Posts: 2,367
How to measure RAM usage?

Is there a way to detect how much RAM your app is using, either in the iPhone simulator or when you transfer it to the device (when you are part of the development program)?
I can run my app in the simulator but would like to know how it is dealing with memory management.
02-13-2009, 07:01 AM
#2
Joined: Nov 2008
Location: Wouldn't you like to know ;)
Posts: 2,632
Send a message via ICQ to brewstermax Send a message via AIM to brewstermax Send a message via MSN to brewstermax Send a message via Yahoo to brewstermax
Quote:
Originally Posted by wastedyuthe View Post
Is there a way to detect how much RAM your app is using, either in the iPhone simulator or when you transfer it to the device (when you are part of the development program)?
I can run my app in the simulator but would like to know how it is dealing with memory management.
I don't really know. It seems to be an impossible task, unless the SDK gives some sort of tethered read when it is hooked up. But if it doesn't crash, the iPhone has at least 5 MB left. All of them have 128 MB, so if it crashes on your device, it will on them all.

02-13-2009, 01:02 PM
#3
Joined: Dec 2008
Location: USA BABY
Posts: 924
theres an app that will tell you its called free memory, i use it. it can also clear up ram too, of you under 20 megs...

idk if thats what your looking for though

DinoSmash online id: *DoMbAv94* (stars included)
I LOVE THE IPOTCH!!!!!!
App reviewer on Appmania!
CarJack Streets Promo Code Giveaway!!!
02-13-2009, 02:27 PM
#4
Yes, Xcode comes with it's own profiling tools. If you have installed Xcode, search for "instruments". I think it's in the utilities folder. Also check out "shark", which it also comes with, which is a CPU profiler that is very useful.

Kevin Calderone - @bovinedragon
Trace 2 is Out!
02-13-2009, 02:28 PM
#5
Joined: Sep 2008
Location: Birmingham, UK, dull corner of the world
Posts: 2,367
Ahh- thanks very much!
02-14-2009, 02:53 AM
#6
Joined: Feb 2009
Location: Sweden
Posts: 1,634
Just select (in Xcode) Run -> Start with Performance Tool -> System usage
02-14-2009, 08:42 AM
#7
Joined: Jul 2008
Location: Toronto, Canada
Posts: 189
Similar to what Anders suggested, but if you run with "Leaks" it will show all of your dynamic memory allocations. Very useful for tracking down memory leaks, or situations where your heap just keeps growing over time.

Manta AppShopper Links:
Chalkboard Stunts, AppSniper, Cubes, Virus, Cubix