Re: iPad Pro apps given more memory?
Re: iPad Pro apps given more memory?
- Subject: Re: iPad Pro apps given more memory?
- From: David Duncan <email@hidden>
- Date: Wed, 09 Dec 2015 17:56:04 -0800
> On Dec 9, 2015, at 5:17 PM, Rick Mann <email@hidden> wrote:
>
>>
>> On Dec 9, 2015, at 16:42 , David Duncan <email@hidden> wrote:
>>
>>
>>> On Dec 9, 2015, at 4:35 PM, Rick Mann <email@hidden> wrote:
>>>
>>>>
>>>> On Dec 9, 2015, at 16:24 , David Duncan <email@hidden> wrote:
>>>>
>>>>
>>>>> On Dec 9, 2015, at 3:36 PM, Rick Mann <email@hidden> wrote:
>>>>>
>>>>>
>>>>>> On Dec 9, 2015, at 15:19 , Jens Alfke <email@hidden> wrote:
>>>>>>
>>>>>>
>>>>>>> On Dec 9, 2015, at 2:56 PM, Rick Mann <email@hidden> wrote:
>>>>>>>
>>>>>>> One of the WWDC videos stressed that iOS apps are given no more than 600 MB of RAM. Our app is VERY RAM-intensive.
>>>>>>
>>>>>> Slightly off-topic, but I wonder if you could use mmap to give your app more address space? Create a big empty file, mmap it as writeable, then use a custom allocator to manage memory in the mapped space.
>>>>>>
>>>>>> (This doesn’t actually give you more RAM; the mapped address space will tend to get paged out to storage so it’ll definitely be slower than real RAM, but it’s better than crashing!)
>>>>>
>>>>> That's an interesting thought. We're also very compute intensive, so the speed hit might obviate the advantages. Worth considering, though.
>>>>
>>>> The virtual limit is 2GB on most devices right now, so you can use mmap() to go beyond the dirty limit.
>>>
>>> Hi. Sorry, can you elaborate on that? Is the "virtual limit" the thing that used to be 600 MB? What's the dirty limit, and how does it compare with the virtual limit?
>>
>> The virtual limit is how much virtual memory you can use. The dirty limit is how much dirty memory you can use. The dirty limit is the limit you had heard previously, I think 650MB on most devices.
>
> Sorry, more questions, to be sure that I'm clear. If there's a discussion somewhere of this already, feel free to point me to that.
>
> - Is there still a 650 MB dirty limit, even on iPad Pro (which has 4GB, more RAM than any previous device), or has that increased as well?
I think it has, but I don’t know what the size it has increased to is.
> - By "virtual memory," I'm sure you don't mean it's swapping to disk (flash). Or do you? If not, how is it virtual?
> - Is there any way to programmatically determine what these limits are, for diagnostic, debug, and development purposes? It would even be helpful to know that we're approaching a limit, it might allow us to do something in the moment to prevent being killed by iOS, even if it's at the expense of execution time (something we don't want to do on a normal basis).
You can determine the virtual limit by trying to allocate memory. As long as you don’t write to the memory, its a virtual allocation. Once you start writing to it, the written to memory becomes dirty, and falls under your dirty memory limit. You can also use Instruments to monitor memory usage and watch when you hit jetsam limits (and inspect the resulting reports).
>
> We basically work with the point clouds and images generated by our 3D camera. Aligning point clouds gets more and more challenging when users have more and more individual scans, as we try each new scan against all the previous scans (there are some low-memory-requirement reject criteria we use, but it's impossible to ignore them all). We also have another data structure that grows with the number of scans conducted. During alignment, we do have these peaks of memory usage that we've worked hard to reduce, but it's getting more and more difficult to do so.
>
> We'd like to be able to suggest to certain customers that an iPad Pro will be able to manage larger models.
>
> Thanks,
>
> --
> Rick Mann
> email@hidden <mailto:email@hidden>
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden