What is the maximum sandbox size on iPad? - iphone

I'm writing an iPad app that acts as a media player (video and photos). I know there is a 2GB size limit on apps, however is this the size limit on an app when downloaded? Or the limit on the size of your sandbox throughout the life of the app? For example what if my small app later on downloads various media files to its sandbox that put the user over 2GB total (app + downloaded media)?
Thanks!

There is no limit to the size of your sandbox other than the remaining capacity of the device itself.

I did a little test last night, and my sandbox was over 8 GB when I finally called it quits.

Sandbox size is unlimited, According to the iPhone Application Programming guide:
To manage program memory, iPhone OS uses essentially the same virtual memory system found in Mac OS X. In iPhone OS, each program still has its own virtual address space, but (unlike Mac OS X) its usable virtual memory is constrained by the amount of physical memory available. This is because iPhone OS does not write volatile pages to disk when memory gets full. Instead, the virtual memory system frees up volatile memory, as needed, to make sure the running application has the space it needs. It does this by removing memory pages that are not being used and that contain read-only contents, such as code pages. Such pages can always be loaded back into memory later if they are needed again.
If memory continues to be constrained, the system may also send notifications to the running applications, asking them to free up additional memory. All applications should respond to this notification and do their part to help relieve the memory pressure. For information on how to handle such notifications in your application, see “Observing Low-Memory Warnings.”

IIRC, Apple limits size of d/led applications to 20MB.

Related

Is there any limit to the capacity of an iPhone's documents folder? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is there any limit of file size in the Document of IOS app
I'm trying to save a text file in Documents folder on an iPhone. Is there a capacity limitation on this folder? Or does it just depend on the iPhone's memory capacity?
There is no limit to the size of your sandbox other than the remaining capacity of the device itself.
To manage program memory, iPhone OS uses essentially the same virtual memory system found in Mac OS X.
In iPhone OS, each program still has its own virtual address space, but (unlike
Mac OS X) its usable virtual memory is constrained by the amount of physical memory
available. This is because iPhone OS does not write volatile pages to disk when memory
gets full. Instead, the virtual memory system frees up volatile memory,
as needed, to make sure the running application has the space it needs. It does
this by removing memory pages that are not being used and that contain read-only contents,
such as code pages. Such pages can always be loaded back into memory later if they are needed again.
If memory continues to be constrained, the system may also send notifications to
the running applications, asking them to free up additional memory. All applications
should respond to this notification and do their part to help relieve the memory pressure.
For information on how to handle such notifications in your application, see
“Observing Low-Memory Warnings.”

Maximum size of document directory in Iphone?

I need to store images and videos in document directory,So i want to know that maximum how much data i can store in document directory that it will not give me memory warning.
Can anyone tell me maximum data storage possible for document directory in Iphone?
I think there is no limit to the size of your sandbox other than the
remaining capacity of the device itself.
According to apple..
To manage program memory, iPhone OS uses essentially the same virtual
memory system found in Mac OS X. In iPhone OS, each program still has
its own virtual address space, but (unlike Mac OS X) its usable
virtual memory is constrained by the amount of physical memory
available. This is because iPhone OS does not write volatile pages to
disk when memory gets full. Instead, the virtual memory system frees
up volatile memory, as needed, to make sure the running application
has the space it needs. It does this by removing memory pages that are
not being used and that contain read-only contents, such as code
pages. Such pages can always be loaded back into memory later if they
are needed again.
If memory continues to be constrained, the system may also send
notifications to the running applications, asking them to free up
additional memory. All applications should respond to this
notification and do their part to help relieve the memory pressure.
For information on how to handle such notifications in your
application, see “Observing Low-Memory Warnings.”
so there is no size limit as such...
The links bellow may be of some help:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/4083-limit-restrictions-filesize-filecount-app-folder.html
https://discussions.apple.com/message/7599983?messageID=7599983#7599983?messageID=7599983

available RAM iPhone app

how do i increase the available memory (more concrete: the part of the RAM) that can be used by my app?
i am not referring to the space available on the harddisk of an iphone, but to the RAM.
does anyone know if there's a way to use the whole free part of the RAM for my app only?
i have to clear this up a bit, sorry if it was too vague:
i had to think of the java heap size, which can be increased by adding a parameter to the startup command of the java programming.
as i don't know, but at the moment suppose on the iphone something similar happens (every app has just xxMB RAM for execution) this value might be adjustable, so that i can use the whole remaining RAM for my app.
which pretty much is what i need for this special app (non-app-store-publication; file-sizes between 50MB and several 100MB)
How do i increase the available memory?
Short answer: you don't.
Memory is managed by the kernel.
Your application process can't control this.
You can't explicitly control this - this is managed by iOS.
You can't do that. Try reducing your memory usage instead of looking for ways to remove well needed limits.
Store your data instead and read from it when needed.
I don't know for sure if you can configure RAM allocated for your app. I think that is taken care of by the iOS kernel
It's unlikely (read: not going to work) that you will be able to allocate anything more than a few Mb in your application at once.
Not planning on publishing your app to the App Store won't change this. Apple don't officially acknowledge the amount of memory in iOS devices. But its known that devices have between 128Mb and 512Mb of physical RAM.
With the kernel, essential applications (Phone app, etc), background processes, etc, you won't have anything like that available to your application. Careful analysis in instruments would suggest that you'll generally start getting memory warnings when you've allocated around 22Mb of RAM in your application.
A change made in iOS 5 makes the watchdog process much more aggressive with killing applications after you get a memory warning. If you get a memory warning on iOS5 you have to reduce your memory usage or you will get jettisoned by the OS.
If you want to proceed, you will have to figure out how to reduce the amount of memory your datasets require. Its unlikely that all of the 100Mb file needs to be in memory at once. iOS devices have "relatively" fast CPU's and storage, you'll have to architect your application to read and write to storage in chunks and work on smaller subsets of your data.
Some related Stackoverflow questions and links:
Monitor memory usage in an iphone app?
How much memory can an iPhone app use?
10 iPhone Memory Management Tips

Max application memory Limit in iPad?

I have created iPad application which downloads images using web service. But my application crashes somewhere during manipulating with high quality images. So my question is - what is max memory limit for application running on iPad? When does the application hit LowMemoryWarning on iPad?
There is no per-application limit so to say. The amount of memory available to an application depends on the amount of free memory, which again depends on the amount of memory used by applications running in the background. These apps include permanently running system apps like SpringBoard, sometimes running system apps like Safari, iPod, etc and (when iOS 4 will come for iPad) user-apps that still run in background.
Nevertheless, I'd say an app should never use more than 50% of all available ram. On iPad this currently means 128 MB and should be quite a lot. Did you do a leak check on your app?

iPhone app uses 60mb of virtual memory on startup

Now, I know my app uses a lot of graphics, but not 60mb of graphics. However, Instruments shows me that the app is using 60+mb of virtual memory just after startup. The compiled app is 24mb big, and we're talking about the idle welcome screen after startup; any idea why the VM size might be this huge?
The virtual memory is the address space allocated by your app from calls like malloc. This does not mean that it uses this much physical memory. For example, all libraries (libSystem, ...) that your app links to are allocated in shared memory, which is part of your virtual memory.
A good explanation of memory types can be found in the help of the "Activity Monitor" application. There's also a great blog post from Mike Ash.
How/when are you loading your image?
I'll take a guess and say that 60MB is the size of your app with uncompressed images.