---
title: CFAllocatorAllocateCallBack
framework: corefoundation
role: symbol
role_heading: Type Alias
path: corefoundation/cfallocatorallocatecallback
---

# CFAllocatorAllocateCallBack

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

## Declaration

```swift
typealias CFAllocatorAllocateCallBack = (CFIndex, CFOptionFlags, UnsafeMutableRawPointer?) -> UnsafeMutableRawPointer?
```

## Parameters

- `allocSize`: This function allocates a block of memory of at least allocSize bytes (always greater than 0).
- `hint`: A bitfield that is currently not used (always set to 0).
- `info`: An untyped pointer to program-defined data. Allocate memory for the data and assign a pointer to it. This data is often control information for the allocator. It may be NULL.

## Return Value

Return Value A pointer to the start of the block.

## See Also

### Callbacks

- [CFAllocatorCopyDescriptionCallBack](corefoundation/cfallocatorcopydescriptioncallback.md)
- [CFAllocatorDeallocateCallBack](corefoundation/cfallocatordeallocatecallback.md)
- [CFAllocatorPreferredSizeCallBack](corefoundation/cfallocatorpreferredsizecallback.md)
- [CFAllocatorReallocateCallBack](corefoundation/cfallocatorreallocatecallback.md)
- [CFAllocatorReleaseCallBack](corefoundation/cfallocatorreleasecallback.md)
- [CFAllocatorRetainCallBack](corefoundation/cfallocatorretaincallback.md)
