Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much memory can an iPhone app use?

Can anyone link me to a page that describes memory allocations for iPhone apps.

I have heard that you are limited to a sandbox of ~20 megs, depending on the state of the phone, but I can't find the source for this.

like image 348
Andrew Johnson Avatar asked Feb 19 '10 21:02

Andrew Johnson


People also ask

How much memory does an app use?

Typically, individual apps can use between 40MB – 1GB of phone storage. If you anticipate downloading just a few key apps and the odd game, then 5GB of storage space should be plenty. If you are a pro gamer and plan to download 200+ apps and large games, then you will require 50GB of phone storage.

Why are apps taking so much storage iPhone?

Some of the biggest culprits are the caches associated with streaming and social media apps. These apps cache large quantities of photos, audio, and video so they display faster and playback doesn't buffer in ordinary use. iOS size cannot be reduced, whereas caches can be deleted-clear safari cache, YouTube, etc.

How can I tell which apps are using the most memory on my iPhone?

Go to Settings > General > [Device] Storage. You might see a list of recommendations for optimizing your device's storage, followed by a list of installed apps and the amount of storage each one uses. Tap an app's name for more information about its storage. Cached data and temporary data might not be counted as usage.


2 Answers

It depends on the device you're using. I've found that with an iPhone 3G, when the total memory your app is using goes over 10-14MB, it's vulnerable to crashing. When it hits 20MB, it will crash for sure.

As far as I know, Apple doesn't give any hard figures for the memory that you can use. It's always changing so it's hard to pin down. They recommend that you rely on memory warnings and respond to them appropriately.

iPhone 3GS has a much higher amount of memory available to apps (I've heard that it's around 4 times). Although the iPhone 3GS only has double the memory of the iPhone 3G, a lot of that memory is taken up by the OS. There's very little left for apps to run in. That's why the 3GS will allow apps to use so much more memory.

Also, there can be a lot of memory already in use by the OS. One example is when safari is keeping a lot of tabs open. This is why lots of games recommend that you restart the device if it crashes a lot.

When you're programming, keep an eye on the increase of memory (due to not properly deallocating objects) and the peak memory. This problem is more about real-world testing (on as many devices as possible) and good programming practices.

Here's an article to ready more about how to deal with memory problems:

http://akosma.com/2009/01/28/10-iphone-memory-management-tips/

like image 159
nevan king Avatar answered Oct 10 '22 15:10

nevan king


This tool finds what is the maximum memory capacity of any iOS device. It also can also find at which memory level you received the Low Memory warning.

here is the link: https://github.com/Split82/iOSMemoryBudgetTest

like image 28
Shahul3D Avatar answered Oct 10 '22 14:10

Shahul3D