iPhone Distribution Build 内存不足故障?

发布于 2024-08-23 07:00:11 字数 167 浏览 5 评论 0原文

当我尝试进行应用程序的分发构建时,我不断遇到内存不足故障。在 Instruments 中测试时,该应用程序最多只能获得 12 兆的实际内存。为什么会发生这种情况?我的应用程序文件夹只有 18 兆,其中没有构建文件夹。使用构建文件夹变为 80 兆。但与我在应用商店中看到的其他大型应用程序相比,这似乎并不多。有什么想法吗?

I keep getting an out of memory failure when I try to do the distribution build of my app. The app only gets up to a max of 12 megs of real memory when testing it in Instruments. Why is this happening? My app folder is only 18 megs without the build folder in it. Turns to 80 megs with the build folder. But this doesn't seem like a lot compared to other big apps I've seen in the app store. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

年华零落成诗 2024-08-30 07:00:11

应用程序在磁盘上的大小和应用程序运行时所需的内存量是两个不同的值。您看到的故障与第二次测量有关,而不是第一次。 12MB 的内存消耗听起来相当大。虽然对于在具有 GB 可用内存(以及磁盘上 VM 系统)的计算机上运行的模拟器来说,此值很小,但在可用内存为 256MB 的设备上,这个值要大得多。根据我的经验,我发现在事情开始恶化之前,大约 8MB 是内存消耗的上限 (YMMV)。

您的应用程序是否正确响应内存不足警告?当事情开始变得棘手时,操作系统将通知您的应用程序 - 不适当地响应警告可能会导致您的应用程序被抢先终止。

The size of the application on disk and the amount of memory required by the application when it is running are two different values. The failure you are seeing is relating to the second measurement, not the first. 12MB of memory consumed sounds like quite a bit. While this value is small for the Simulator being run on a machine with gigabytes of available memory (and an on-disk VM system), on the device where 256MB total memory is available it is a much bigger deal. In my experience I've found about 8MB to be an upper limit in memory consumption before things start going south (YMMV).

Is your application responding correctly to low memory warnings? Your app will be notified by the OS when things start to get hairy- not responding to the warnings appropriately can result in your application being preemptively terminated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文