Predefined Allocators

CFAllocator provides the following predefined allocators. In general, you should use kCFAllocatorDefault unless one of the special circumstances exist below.

Topics

Constants

kCFAllocatorDefault

This is a synonym for NULL.

kCFAllocatorSystemDefault

Default system allocator.

kCFAllocatorMalloc

This allocator uses malloc(), realloc(), and free().

kCFAllocatorMallocZone

This allocator explicitly uses the default malloc zone, returned by malloc_default_zone().

kCFAllocatorNull

This allocator does nothing—it allocates no memory.

kCFAllocatorUseContext

Special allocator argument to CFAllocatorCreate—it uses the functions given in the context to allocate the allocator.