tags:

views:

51

answers:

1

How is internally the maximum size of stack and Heap is set? How can we determine its maximum size? I am not using it for any of my projects. But this is just out of curiosity.

A: 

iPhone/iOS has support for virtual memory (just no backing store in normal use), and a virtual address space much larger than physical RAM. So the maximum size for either stack or heap is until the sum of all (maybe dirty) memory use (in allocated pages) runs out of that available for the current app process/sandbox, which will vary depending on what else is running on the system.

hotpaw2
"which will vary depending on what else is running on the system".Does it mean that for each application running in the iOS, not the same amount memory is provided for use?
Krishnan
The same application can end up with very different amounts of available memory when run on the same device 1 minute apart.
hotpaw2