Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How much memory an application can use ?

Hi

How much memory one application can use in iPad3 of 1 GB RAM or iPad2 of 512 MB RAM ? Is there any limitation for it ?




Thanks

iPad 2, iOS 5

Posted on Jul 13, 2012 4:04 AM

Reply
Question marked as Best reply

Posted on Jul 14, 2012 12:21 PM

Did you read this in Appendix A of the iOS App Programming Guide? Also, the Performance Tuning section describes your responsibility to use memory efficiently and provides some ideas on how to use lazy loading to reduce memory footprint.

To manage program memory, iOS uses essentially the same virtual memory system found in Mac OS X. In iOS, each program still has its own virtual address space, but unlike Mac OS X, the amount of usable virtual memory is constrained by the amount of physical memory available. This is because iOS does not support paging to disk when memory gets full. Instead, the virtual memory system simply releases read-only memory pages, such as code pages, when it needs more space. Such pages can always be loaded back into memory later if they are needed again.

9 replies
Question marked as Best reply

Jul 14, 2012 12:21 PM in response to amiya.sahu

Did you read this in Appendix A of the iOS App Programming Guide? Also, the Performance Tuning section describes your responsibility to use memory efficiently and provides some ideas on how to use lazy loading to reduce memory footprint.

To manage program memory, iOS uses essentially the same virtual memory system found in Mac OS X. In iOS, each program still has its own virtual address space, but unlike Mac OS X, the amount of usable virtual memory is constrained by the amount of physical memory available. This is because iOS does not support paging to disk when memory gets full. Instead, the virtual memory system simply releases read-only memory pages, such as code pages, when it needs more space. Such pages can always be loaded back into memory later if they are needed again.

Jul 14, 2012 12:47 PM in response to amiya.sahu

The OS manages memory - asking how much your app can use is a windows-centric idea, I think...


As of iOS 5 there is only 1 level of memory warning – free up memory or be killed. If you are getting the warning, you are on the chopping block, period :).


See Cocoa Memory Management [ https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMg mt/MemoryMgmt.html]


Use Instruments to test if you must.


And remember, unused memory is wasted memory 🙂



Ken

Jul 14, 2012 1:50 PM in response to K T

Mobile is same story. Even the old Windows Mobile used the same memory management approach. I remember long ago when Microsoft removed the ability for users to explicity terminate apps from the UI because there was no need, it only slowed things down when the user later switched back to that app. And there was a low memory notification for apps to reduce memory footprint, just like iOS.

Jul 14, 2012 2:54 PM in response to Llessur999

How to you 'set' the memory for an OS app?


The concept of application memory 'requirements' is non-existent on iOS... It's simply not the same. Unlike desktop apps that come with a minimum spec, etc.


Totally common in Windows/Mac....show me one iOS app in the store that comes with anything like that spec. There are none, because it isn't the same environment at all.


On iOS, an app will get what it needs dynamically....and be killed if it gets greedy in the process. Windows/OS X won't blindly kill an app...they just restrict it's performance. If an app misbehaves in terms of memory it leads to a crash. On iOS, it leads to shot to the head.

Jul 14, 2012 4:16 PM in response to Llessur999

For me, the difference begins with the fact that unlike OS X, iOS has no garbage collection. The two seem to be converging, w/OS X moving towards iOS, however, so how that plays out going forward remains to be seen.


For now, they don't work the same...I suppose that's a good thing at this point in time 🙂


Ken

How much memory an application can use ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.