How to measure RAM usage?

Discussion in 'Public Game Developers Forum' started by wastedyuthe, Feb 13, 2009.

  1. 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.
     
  2. brewstermax

    brewstermax Well-Known Member

    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.
     
  3. supg328911

    supg328911 Well-Known Member

    Dec 6, 2008
    924
    0
    0
    pro ping pong player!!!!
    USA BABY
    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
     
  4. bovinedragon

    bovinedragon Well-Known Member

    Sep 20, 2008
    98
    0
    0
    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.
     
  5. Ahh- thanks very much!
     
  6. Anders

    Anders Well-Known Member

    Feb 3, 2009
    1,634
    0
    0
    Co-owner and CTO at Color Monkey
    Sweden
    Just select (in Xcode) Run -> Start with Performance Tool -> System usage
     
  7. Manta Research

    Manta Research Well-Known Member

    Jul 28, 2008
    189
    0
    0
    Toronto, Canada
    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.
     

Share This Page