Re: what's an NSZone?
Re: what's an NSZone?
- Subject: Re: what's an NSZone?
- From: "Timothy J. Wood" <email@hidden>
- Date: Fri, 15 Feb 2002 16:45:23 -0800
Yes, way back in NEXTSTEP 3.x I used zones on a couple projects to
great effect. In particular, you could create a 'no free' zone that had
better allocation performance and you could destroy an entire zone at
once. This was useful since I was processing a big set of data and was
basically doing:
create a huge number of interconnected objects
do some processing
destroy all the objects
In the version that crawled my data structure at the end to free
memory a bunch of time was taking up doing this work -- but if I could
just toss the whole zone, it was _much_ faster.
The oft discussed reason that zone destruction was eliminated was the
global extra ref count table used by Cocoa (and now CoreFoundation --
although it and Cocoa presumably don't share the same table).
My answer to this is that each zone should have its own global extra
ref count table for objects contained in it (although this would have
some performance impact on naively written reference counted objects --
any of the CF and Foundation objects probably wouldn't care since they
use inline ref counts and overflow into the global table).
-tim
On Friday, February 15, 2002, at 04:02 PM, Lance Bland wrote:
On Friday, February 15, 2002, at 06:23 PM, Nat! wrote:
And then there is the CFAllocator in Corefoundation, which isn't
interchangeable with NSZone as well, but appears to be pretty much the
same idea.
Has anyone ever noticed any speedup with use of zones in a real-world
situation, or is it just a nice idea?
We've done some performance tests and it didn't seem to make any
difference (back when zones were real). I suppose that would be doubly
true in today's world where 512Mbyte is not uncommon (no VM).
-lance
_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.