0

可能重复:
IOS应用程序的文档中是否有文件大小限制

我正在尝试将文本文件保存在 iPhone 上的 Documents 文件夹中。这个文件夹有容量限制吗?还是仅取决于 iPhone 的内存容量?

4

1 回答 1

0

除了设备本身的剩余容量外,沙盒的大小没有限制。

     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.”
于 2012-04-28T09:33:49.087 回答