• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Xcode] Interpreting Object Alloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xcode] Interpreting Object Alloc


  • Subject: Re: [Xcode] Interpreting Object Alloc
  • From: David Duncan <email@hidden>
  • Date: Fri, 31 Jul 2009 09:35:46 -0700

On Jul 31, 2009, at 6:13 AM, Alexander von Below wrote:

I suspected this means our app is eating memory somewhere, even though there were no leaks. I filed this as a bug (ID# 7015176), but the engineers relied to me that the memory usage in Activity Monitor did not increase. Indeed, I added the Activity Monitor instrument to my trace and could not see any suspicious activity either.

This leads me to my question: Does ObjectAlloc tell me the truth? Is it possible for the graph in ObjectAlloc to rise without the app actually consuming the memory?

This is a bug in iPhone OS for certain types of memory allocations done on your behalf. ObjectAlloc is basically being told that these allocations are malloc() type events, when they are really realloc() type events, and so it is counting them over and over as new memory. You can verify this by checking the details of the particular memory growth your seeing and verifying if the objects generally share the same address (there will typically be a number of addresses used, but the lots of objects will share the same address).

Its not a case of ObjectAlloc lying to you, so much as a case of it being told bad information and passing that on to you.

Or, to phrase this differently: What is the right way to ensure that my app (or certain repetitive operations therein), Mac or iPhone, is not eating memory away? I was alway under the impression that ObjectAlloc is the tool to do that.

If you are concerned about your memory usage, the Activity Monitor tool is very very useful for this type of monitoring, as the ObjectAlloc tool does not show all memory allocations. That said, ObjectAlloc still allows you to get far more details on your memory usage, which can be very useful for diagnosing issues in your application.
--
David Duncan
Apple DTS Animation and Printing

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[Xcode] Interpreting Object Alloc (From: Alexander von Below <email@hidden>)

  • Prev by Date: Re: [Xcode] Interpreting Object Alloc
  • Next by Date: Info request on "DWARF with DSYM" settings
  • Previous by thread: Re: [Xcode] Interpreting Object Alloc
  • Next by thread: Xcode SCM subversion removing a directory
  • Index(es):
    • Date
    • Thread