低内存,640Kb的实时字节? [英] Low memory with 640Kb of live bytes?

查看:129
本文介绍了低内存,640Kb的实时字节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要显示大量图像和视频。

i've a problem with my application that need to display a lot of images and video.

运行ObjectAlloc工具后,我发现实时字节数为640Kb当应用程序崩溃时,整体内存为31,54Mb。

After running ObjectAlloc tool, i see that the live bytes is 640Kb and the overall memory is 31,54Mb when the application crash.

在组织者中我得到一个低内存报告,所以我猜应用程序因内存不足而崩溃但是ObjectAllocation数据对我来说没有任何意义...

In the organizer i get a "low memory" report so i guess the app crashed because low memory but the ObjectAllocation data don't make any sense to me...

任何想法?

这是组织者崩溃日志:

Incident Identifier: CDCAF38C-CFFD-4316-9C4A-5C8E37794B49
CrashReporter Key:   65390aeb97b2b81076576c3e33b025feb5db9202
OS Version:          iPhone OS 3.1.3 (7E18)
Date:                2010-05-19 10:07:19 +0200

Free pages:        372
Wired pages:       12260
Purgeable pages:   0
Largest process:   DTMobileIS

Processes
         Name                 UUID                    Count resident pages
       ATreeTest <1d51c3a5fef8b747c3a1be9405bdd52a>    1150 (jettisoned) (active)
      DTMobileIS <69c3fa96db2f29474d62964aa1a69bfa>    3316
notification_pro <8a7725017106a28b545fd13ed58bf98c>      68
    mediaserverd <3d3800d6acfff050e4d0ed91cbe2467e>     464 (jettisoned)
         syslogd <8eddddc00294d5615afded36ee3f1b62>      56 (jettisoned)
            apsd <32070d91b216d806973c8f1b1d8077a4>     173
     SpringBoard <324939a437d1cca1fa4af72d9f5d0eba>    2475 (jettisoned) (active)
      accessoryd <8f21c8b376d16e2ccb95ed6d21d8317a>      99 (jettisoned)
notification_pro <8a7725017106a28b545fd13ed58bf98c>      64
            ptpd <f5e735bffd0557fcdc53cb35b6d9ce66>     129
         notifyd <591dd4dd804b4b8741f52335ea1fa4ab>      64
      CommCenter <b4b87526ae086bb62c982f1078f43f81>     167
         configd <85efd41aceac34ccc0019df76623c7a9>     294
       fairplayd <a2eaf736b3e07c7c9a2c82e9eb893555>      91
   mDNSResponder <df1cd275e4ad434e0575990e8e1da4cb>     101
       lockdownd <80d2bd44c0bcca273d48ce52010f7e65>     285
         launchd <a5988245aade809bf77576f1d9de42c5>      71



**End**


推荐答案

ObjectAlloc 工具不显示应用程序的完整内存使用情况,特别是如果你有很多用户界面元素正在处理。要在任何给定时间更准确地读取应用程序的总内存占用量,请使用内存监视器仪器。您将看到您的应用程序确实超出了设备上的内存阈值。''

The ObjectAlloc instrument does not display the full memory usage of your application, particularly if you have a lot of user interface elements that you are dealing with. For a more accurate reading of your application's total memory footprint at any given time, use the Memory Monitor instrument instead. You will see that your application is indeed exceeding the memory threshold on the device.''

您可以添加内存监视器通过单击Instruments中工具栏的Library按钮来选择仪器。将显示所有可用仪器的列表,并将内存监视器拖到主窗口的仪器区域。

You can add the Memory Monitor instrument by clicking on the Library button of the toolbar in Instruments. A list of all the available instruments appears, and you drag Memory Monitor onto the Instruments area of the main window.

如果将内存监视器仪器与 ObjectAlloc 组合使用,您应该能够跟踪触发内存峰值的内容在您的申请中。选择内存监视器的跟踪检查头选项(在仪器列表下方;首先单击内存管理器以激活该工具,选项将显示在底部窗格中)以查看应用程序执行时记录的内存大小。

If you combine the Memory Monitor instrument with the ObjectAlloc one, you should be able to track what is triggering memory spikes within your application. Select the Track inspection head option for the Memory Monitor (below the Instruments list; click on Memory Manager first to activate the tool, the options will appear on the bottom pane) to view the recorded memory size of your application at any point in its execution.

这篇关于低内存,640Kb的实时字节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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