Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
483 views
in Technique[技术] by (71.8m points)

iphone - Low memory with 640Kb of live bytes?

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

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

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...

Any ideas?

This is the Organizer crash log:

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**
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.''

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...