On 18 Aug 2010, at 06:57, Ken Ferry wrote:
> 
> Did you say that the Object Alloc tool does not report the memory that is 
> being used?  First verify that.  You don't want to use the object alloc tool 
> from the leaks template, its config options are not appropriate.  Start from 
> the "Allocations" template.
>> 

I must admit I'm a little lost with Instruments - I only really understand it in
a vague, arm-waving way.

The object alloc tool in the Leaks template seems to remove old allocations
from the graph when (I assume) those memory blocks are released, so its
trace is mostly blank beyond an initial spike or two and a short running trail
that follows the 'play head'.

The ObjectAlloc template results is different, and I'm not quite sure what I'm
looking at.  I can see allocations occurring at specific events (launch, switch
to test mode, select source files, and start) but I don't understand what's
going on beyond my 'start' phase - I see allocations rising for a few seconds
and then flattening off, but my code isn't doing anything different at that
point.  Each test cycle is identical, taking about 15ms - there's no different
code path after a few seconds.

Assuming I've got my sharing settings right, there should be a screen grab
at <http://files.me.com/stuart.rogers/vlpa1q>

> If that fails, this suggests that the memory is allocated in an exotic way.  
> Instruments will catch malloc'd memory, but not mmap'd memory or direct calls 
> to vm_allocate.  

If anything exotic's going on, I'm pretty sure it's not directly of my doing!
My code mostly uses standard Obj-C alloc/init, with a smattering of malloc,
but definitely no mmap or vm_allocate.

> You can try using tools like /usr/bin/vmmap and /usr/bin/allmemory to try to 
> see where the memory is going.  If it really is exotic, though, it's probably 
> CoreImage.  Last I was aware there _was_ some global caching in CoreImage 
> that was too aggressive in some circumstances, but things may very well have 
> changed.

Thanks for the pointers.  This might take me a while as this is taking me
into unchartered territory.  This, along with Shawn Erickson's suggestion
of disabling file caching, has given me plenty to start thinking about.

Stuart

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to