Obtains the number of bytes likely to be allocated upon a specific request.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The allocator to use, or
NULLfor the default allocator.
The number of bytes to allocate. If the value is
0or less, the result is the same value.
A bitfield of type
CFOptions. Pass flags to the allocator that suggest how memory is to be allocated.
0indicates no hints. No hints are currently defined, only
0should be passed for this argument.
The number of bytes likely to be allocated upon a specific request.
The return value depends on the allocator's internal allocation strategy, and will be equal to or larger than
size. Calling this function may help you better match your memory allocation or reallocation strategy to that of the allocator.
Note that the return value depends on the internal implementation of the allocator and the results may change from release to release or from platform to platform.
If no function callback is assigned to the
preferred field of the allocator's context (see the
CFAllocator structure), then the value of
size is returned.