Function

CFAllocatorGetContext(_:_:)

Obtains the context of the specified allocator or of the default allocator.

Declaration

func CFAllocatorGetContext(_ allocator: CFAllocator!, _ context: UnsafeMutablePointer<CFAllocatorContext>!)

Parameters

allocator

The allocator to examine. Pass NULL to obtain the context of the default allocator.

context

On return, contains the context of allocator.

Discussion

An allocator's context, a structure of type CFAllocatorContext, holds pointers to various function callbacks (particularly those that allocate, reallocate, and deallocate memory for an object). The context also contains a version number and the info field for program-defined data. To obtain the value of the info field you usually first have to get an allocator's context.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software