tags:

views:

405

answers:

2

Hi All,

Currently I am writing an iPad app. I am using a lot of images in this app around 40 MB of images! This app works fine in simulator but crashing on device. I think the problem is with memory.

I wanted to know how much memory I can use on iPad?

Thanks Saurabh

A: 

The iPad has 256 MB of memory, and of which, only around 100 to 120 are usable in an application. Note that this number is variable as the VM releases memory from previous applications, and could be less if you're using apps like iPod in the background.

My suggestion, look at what you can do to reduce the size of your images, through different resolutions, lower quality images, or such.

jer
Thanks! I am compressing the images again and trying to get the size under 10 MB or less. I'll check and post here...
Saurabh
+1  A: 

Remember that 40MB of image files on disk is far more when put in memory. On disk they are compressed but once you load it into memory you use just as much memory as a uncompressed image. If I remember right its (width x height x (bits per pixel/8)) = mem usage so for a full screen image (1024x768x(16/8)) = 1,572,864 so around 1.5 MB of RAM while on disk it may only be a couple hundred KB.

jamone
width x height x (ceil ( bits per pixel / 8 ) )
Michał Piaskowski
Thanks! I am compressing the images again and trying to get the size under 10 MB or less. I'll check and post here...
Saurabh
Compressing the image won't help RAM usage. Only lowering the images' resolution will help that.
jamone