iPad receiving memory warning with low memory use
Posted
by Fer
on Stack Overflow
See other posts from Stack Overflow
or by Fer
Published on 2010-05-29T16:58:51Z
Indexed on
2010/05/29
17:02 UTC
Read the original article
Hit count: 575
I have an UIWebKit with a HTML, this HTML have several images and text, but just displaying it gives me the memory warning. So I did some tests: The same HTML with different images, fullsize, and after the same images but reduced 50% from it's original size, for the 50% reduced images, I went to preview and reduced all images in 50%
The surprising part is the 50% test, you can see that even with 16 images, the memory peak is 4.90MB. That's really surprising. Notice that these values are not always the same, they change but there's not a huge difference between the tests.
In the 50% issue, in the 8 and 16 images, although the memory is low, sometimes a memory warning appears, but the performance enhance is noticeable compared to the full size images
standing still = memory after scrolling all article
1 Image = [standing still 5MB] [rotating 5.6MB]
2 Images = [standing still 6.99MB] [rotating 7.7MB]
3 Images = [standing still 9.04MB] [rotating 10.9MB]
4 Images = [standing still 10.89MB] [rotating 13.20MB]
8 Images = [standing still 23.14MB] [rotating 25.20MB] (sometimes crashes)
16 Images = [standing still 27.14MB and app crashes]
50%
1 Image = [standing still 3.2MB] [rotating 3.67MB]
2 Image = [standing still 3.2MB] [rotating 3.70MB]
3 Image = [standing still 3.3MB] [rotating 3.79MB]
4 Image = [standing still 3.3MB] [rotating 3.80MB]
8 Images = [standing still 4.29MB] [rotating 4,63MB] (sometimes crashes)
16 Images = [standing still 4.79MB] [rotating 4,90MB] (sometimes crashes)
My question is: The app sometimes crashed with 16 small images. Why? The memory was much lower.
What is the limit of memory use? These numbers are helpful if you also tell us the maximum. But, the maximum seemed different with the 50% size images. 13.2MB works for large images and 3.8 for small images. Anything higher sometimes crashes. That makes no sense.
© Stack Overflow or respective owner