Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the application heap size in iphone?

Tags:

iphone

HI,,

What is the application heap size in iphone ? i mean that up to what size a application can use memory in the iphone. Does it same for the ipod or it is different for iphone or ipod?

What is the downloaded content size in iphone which we can download in our app using NSdata?

Thanks

like image 927
B25Dec Avatar asked Dec 08 '09 18:12

B25Dec


2 Answers

Available memory is not fixed. As well as device differences there are running processes (system processes) that consuming varying amounts of the device memory - and since there is no virtual memory all processes are drawing from the same heap.

All iPhones up to and including the 3G, and all iPod touches at least up to the current models (not sure about those) had 128Mb RAM. the 3GS has 256Mb.

For 128Mb devices the recommendation is to try and keep below about 26Mb, although you should usually have up to about 60Mb available (you can use the 34Mb inbetween for caching transient resources).

Sometimes the available RAM can even dip below 26Mb, so the smaller your footprint the better.

like image 145
philsquared Avatar answered Oct 03 '22 00:10

philsquared


This isn't documented, but people have reported that memory warnings occur around 20-22MB on the iPod/iPhone 1/2/3G and around 128 MB on the 3GS.

like image 21
Ben S Avatar answered Oct 03 '22 02:10

Ben S