What is the largest amount of memory, in bytes, that I can safely allocate in one block on an iOS device?
Asked
Active
Viewed 189 times
1 Answers
2
It's not a fixed number - it depends on phone model and SDK version. It also depends on how many other app's are running on the device and at what point during the program execution that the request was made (memory spikes tend to get your application terminated quickly). To be frank, it's impossible to give a definitive number but it ranges from 20 to 100MB.
See here: iOS memory allocation - how much memory can be used in an application?

Community
- 1
- 1

Perception
- 79,279
- 19
- 185
- 195
-
The problem is, once I allocated an array `objects[128][128][128]`, where each object was 2 bytes in size, and the app crashed on launch. And that's only a 4.194mb contiguous block. – Greg Mar 03 '12 at 21:57