任何iPhone应用程序使用的内存 [英] Memory used by any iPhone app

查看:159
本文介绍了任何iPhone应用程序使用的内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对iOS内存管理有一些不太了解。

There are a few things that I don't understand about iOS memory management.


  1. 我想知道多少内存通常是iPhone应用程序在设备上运行时需要的内容(是否有任何修复号码如10MB?)

  1. I wanted to know how much memory typically an iPhone app takes while running on device (Is there any fix number like 10MB?)

如果应用程序包含大量大图像会产生什么影响在记忆?它们只在加载时影响内存吗?

If an app includes lot of large images what is the impact on the memory? Do they only impact memory when they are loaded?

当有多个应用运行时,iOS如何管理内存?

How does iOS manage the memory when there are multiple apps running?

请帮助我理解这些概念。

Please help me understand these concepts.

推荐答案

没有明确或固定数量的iOS设备上的应用程序可用的内存。

There isn't a stated or fixed amount of memory available to apps on iOS devices.

也就是说,据报道有些游戏应用程序使用超过55MB的内存,但据报道操作系统也会杀死这些游戏如果在设备重置后没有立即运行,则会有一定比例的时间。

That said, there are game apps that are reported to use over 55MB of memory, however the OS is also reported to kill these games some significant percentage of the time if not run right after a device reset.

如果您使用22MB或更少的内存,操作系统仍可能会因为没有内容而终止您的应用程序足够的可用内存,但它也必须杀死应用程序商店中的大部分其他应用程序,所以你会在非常好的公司。

If you use 22MB of memory or less, the OS could still kill your app because there wasn't enough available memory, but it would also have to kill a massive percentage of other apps in the app store, so you would be in very good company.

当任何应用程序(前台或后台)请求足够的内存来开始充分耗尽内存池,内存警告将发送到其他应用程序。如果内存池足够小,应用程序就会被杀死,包括可能是前台应用程序,如果这是一个很大的内存耗尽。

When any app (foreground or background) requests enough memory to start depleting the memory pool sufficiently, memory warnings are sent to other apps. If the memory pool gets small enough, apps are killed, including possibly the foreground app if it's a big memory hog.

这篇关于任何iPhone应用程序使用的内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆