Re: Memory not being released in a timely manner
Re: Memory not being released in a timely manner
- Subject: Re: Memory not being released in a timely manner
- From: Greg Parker <email@hidden>
- Date: Mon, 10 Jun 2013 13:29:44 -0700
On Jun 7, 2013, at 9:44 AM, Jonathan Taylor <email@hidden> wrote:
> Your suggestion of the VM Tracker instrument (which I had not spotted before) did bring up some interesting results though. These autoreleased image buffers that were causing the problem are definitely NOT reported at all by Allocations ("live" bytes stays stable at 250MB), but they do show up under VM Tracker as "CG image" and "CG raster data" - although I don't think there's a way of getting any further details about the buffers they provide the backing for?
You're probably seeing something like this:
1. Some code runs a loop that generates autorelease garbage without spinning any autorelease pools.
2. Some of the autoreleased but not deallocated objects are NSImage objects.
3. The NSImage objects allocate their pixel data using something other than malloc(). For example, the memory is allocated and shared with the WindowServer process using the Mach memory machinery.
4. The NSImage objects are visible in the Allocations instrument, but they are small and hard to see. The lost memory is mostly the NSImage pixel data which is visible only to the VM Tracker instrument.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden