Re: Coding with VM limitation on the iPhone?

2009-08-19 Thread David Duncan
On Aug 18, 2009, at 4:53 PM, Jonathon Kuo wrote: Hmm, that's kind of a harsh environment... The notification mechanism is great for the purpose of controlling bloat, but doesn't tell you how much VM you have to play with at the outset. I suppose all I can do is *try* to alloc() and if it

Coding with VM limitation on the iPhone?

2009-08-18 Thread Jonathon Kuo
I'm writing an app for the iPhone, but I need to be mindful how much virtual memory there is available to the app when it runs, so I can manage allocing and deallocing some large arrays. I'm guessing that the OS runs in a small amount (100MB?) of flash memory compared to the 16GB or 32GB

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Luke the Hiesterman
Your app will not be paged to the disk at all. It must run entirely on in physical memory. To know when you're running out of memory, override -[UIViewController didReceiveMemoryWarning] Luke On Aug 18, 2009, at 4:34 PM, Jonathon Kuo wrote: I'm writing an app for the iPhone, but I need to

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Bryan Henry
The proper way to manage large objects that can be easily reloaded as needed is to make sure and respond to memory warnings. The exact amount of memory available to your application depends on both the device (which could vary greatly in terms of hardware resources) and other processes

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Alex Kac
You typically only get about 5-40MB of available RAM. Its not flash. Its real RAM. But you have no guarantees. The iPhone has a robust memory system with low memory warnings and such and you just have to use those to determine if you have enough. On Aug 18, 2009, at 6:34 PM, Jonathon Kuo

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Bryan Henry
Oh, I forgot to add - specifically you can either override - [UIViewController didReceiveMemoryWarning] or listen for the (this is from memory, so verify it with the docs) UIApplicationDidReceiveMemoryWarningNotification notification if you need to do something in other than a view

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Jonathon Kuo
On Aug 18, 2009, at 4:37 PM, Luke the Hiesterman wrote: Your app will not be paged to the disk at all. It must run entirely on in physical memory. To know when you're running out of memory, override -[UIViewController didReceiveMemoryWarning] On Aug 18, 2009, at 4:38 PM, Alex Kac wrote:

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Steve Christensen
On Aug 18, 2009, at 4:53 PM, Jonathon Kuo wrote: On Aug 18, 2009, at 4:37 PM, Luke the Hiesterman wrote: Your app will not be paged to the disk at all. It must run entirely on in physical memory. To know when you're running out of memory, override -[UIViewController

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Cem Karan
Jonathon Kuo wrote on August 18, 2009 7:34:06 PM EDT: I'm writing an app for the iPhone, but I need to be mindful how much virtual memory there is available to the app when it runs, so I can manage allocing and deallocing some large arrays. I'm guessing that the OS runs in a small amount