Type Alias

CFAllocatorPreferredSizeCallBack

A prototype for a function callback that gives the size of memory likely to be allocated, given a certain request.

Declaration

typedef CFIndex (*CFAllocatorPreferredSizeCallBack)(CFIndex size, CFOptionFlags hint, void *info);

Parameters

size

The amount of memory requested.

hint

A bitfield that is currently not used (always set to 0).

info

An untyped pointer to program-defined data.

Return Value

The actual size the allocator is likely to allocate given this request.

Discussion

A prototype for a function callback that determines whether there is enough free memory to satisfy a request. In implementing this function, return the actual size the allocator is likely to allocate given a request for a block of memory of size size. The hint argument is a bitfield that you should currently not use.

See Also

Callbacks

CFAllocatorAllocateCallBack

A prototype for a function callback that allocates memory of a requested size.

CFAllocatorCopyDescriptionCallBack

A prototype for a function callback that provides a description of the specified data.

CFAllocatorDeallocateCallBack

A prototype for a function callback that deallocates a block of memory.

CFAllocatorReallocateCallBack

A prototype for a function callback that reallocates memory of a requested size for an existing block of memory.

CFAllocatorReleaseCallBack

A prototype for a function callback that releases the given data.

CFAllocatorRetainCallBack

A prototype for a function callback that retains the given data.