Function

CFAllocatorAllocate(_:_:_:)

Allocates memory using the specified allocator.

Declaration

func CFAllocatorAllocate(_ allocator: CFAllocator!, _ size: CFIndex, _ hint: CFOptionFlags) -> UnsafeMutableRawPointer!

Parameters

allocator

The allocator to use to allocate the memory. Pass NULL or kCFAllocatorDefault to use the current default allocator.

size

The size of the memory to allocate.

hint

A bitfield containing flags that suggest how memory is to be allocated. 0 indicates no hints. No hints are currently defined, so only 0 should be passed for this value.

Return Value

A pointer to the newly allocated memory.

See Also

Managing Memory with an Allocator