The zone mechanism provides a way to group related pointers in a program. For example different portions of an application which do not have much in common, can use different zones. This improves the memory localization in the virtual memory system of the operating system and lowers the mapping in and out of the memory pages.
In the current implementation, both garbage collectors, the Boehm's collector and the one based on reference counting, do not take advantage of this behavior. When a collection starts searching for the unused pointers can spread over all the existing zones.
Because of this, when libFoundation is compiled with support for
the Boehm's collector, the zones are completely disabled. The
NSZone functions that perform memory allocation simply invoke the
collector's functions.
Go to the first, previous, next, last section, table of contents.