how can i read out the memory usage of the game when running on the iphone?
Plug in your iPhone and in XCode select ‘Run > Start with Performance Tool > Instruments Templates > Activity Monitor’
Thank you!
What is the critical RAM size for a game on the iPhone?
Exceeding 40mb of “real” memory will get you into a danger zone.
The first release of zombieville never crashed on my device (or the majority of users) but I got a few reports of crashing mid-game from people, mostly those who had jailbroken devices and were running mods of some sort that were wasting their devices’ limited RAM. If I recall correctly, zombieville v1.0 hovered in the mid-40mb range due to my large volumes of uncompressed art. I pushed out an update within a few weeks that brought it down to 39 or so at its peak (among other things) and now I never get crash reports.
hello all.
In the Activity monitor (Graphical) i can’t set Real memory but only wired, active, inactive, used and free.
So i have to check only Real memory to testing the apps?
I’m testing my game and its almost ready to publish.
And i have real memory peaks around 45… never crashed in my iphone…(EDIT After heavy audio and textures compressions , reduced to 36 MB ! )
PS : Use jailbroken devices is against Apple agreement, so i will not test any app on those devices.
Thank you
Andrea
Every 10-20 seconds the memory usage increases by 10kb in my test where nothing happens but the camera flies over some planes with a skydome in my world (starting at 20.06MB).
Does that mean it will crash after 11 hours?
I also tested it with a simple rotating cube over a plane and also got increasing memory by time.
That slow steady increase is memory being allocated by your scripts. After growing about 4mb, it will hit a cieling and run garbage collection. Depending on how much allocation you’re doing there might be a pretty noticeable framerate hiccup when this occurs, but it won’t grow forever and crash your app.
Care to post your script that was simply rotating a cube?
on my iphone 3G you actually enter the critical ram area with 25 - 30MB of RAM usage. Thats what I have commonly left after starting up and starting a “regular handy service”
Its never, even after a fresh restart, anywhere near 40mb left, more towards 30
Information gathered with Free Memory (costs $0.99)
translation from denglish to english: “handy” = “mobile phone”
anyway… so i can not be 100% certain that my game will run on all iphones when i use the first generation ipod touch?
Sadly not no, my iTouch 1st gen commonly has at least 40mb available after restart.
:shock: so i have only 10MB left now? headshot
Well, the current release of Zombieville uses somewhere in the mid to upper 30’s at its peak, and I haven’t gotten a single crash report in the last month, nor does xcode warn the app of reaching critical memory usage (it used to get warnings when the app used 45mb or so). Obviously less memory usage is better if you can help it, but staying under 25mb is unnecessary.
Hi! Anyone know for the new devices (after iphone 3gs and so on) what is aproximately the memory critical area? Thanks!