Re: Heap and memory zone queries
Re: Heap and memory zone queries
- Subject: Re: Heap and memory zone queries
- From: Andrew Farmer <email@hidden>
- Date: Sun, 6 Dec 2009 17:25:47 -0800
On 6 Dec 2009, at 13:57, email@hidden wrote:
> 1. GC is on. Does that mean that all allocations invocation by NS*/CF* will be in the auto_zone?
Not necessarily. AppKit and CoreFoundation objects are still capable of allocating unmanaged memory (via malloc(), for instance) for their use under garbage collection, so long as they clean it up when they're done with it.
> 2. Are the allocations accomplished using NSZoneMalloc and CFAllocatorAllocate?
Not sure on this one - I'll defer to someone more knowledgable.
> 3. grepping the heap(1) output shows little data allocated to NSText* instances. Is some of the 40MB of non-object data allocated by the NSText system? for glyph storage?`
> 4. If 3 is not utterly incorrect - why isn't the memory utilised by the NSText system flagged as being allocated by NSText*.
All that #3 means is that the NSText objects themselves are small. heap(1) is relatively simplistic - it can't determine that one allocated object "belongs to" another. If a NSText object allocates a bunch of CTRun objects (for instance), those allocation will be billed against CTRun, not NSText._______________________________________________
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