MonoTouch instability continues: managed memory allocator crashes

 ̄綄美尐妖づ 提交于 2019-11-28 20:53:35

The Darwin kernel overcommits memory.

What this means is that if you request 200 megs of ram, you will get them, even if they are not available and as long as you do not actually consume the memory, your application will run fine.

Only when you actually write to the page will the page be allocated to your process.

A proper test would require you to allocate the memory and then fill up the used memory, this is why you probably get the impression that you can allocate 200 megs of ram even when you might not even have it.

A simple program will show you this: try allocating 500 megs, the OS will say "Yes, you got it", but there are no iPhones with this kind of memory.

A sample test case would go a long way to showing what the problem is.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!