withCapacity
Creates a buffer memory descriptor and allocates enough bytes to meet the specified capacity.
Declaration
static OSPtr<IOBufferMemoryDescriptor> withCapacity(vm_size_t capacity, IODirection withDirection, bool withContiguousMemory);Parameters
- capacity:
The number of bytes to allocate.
- withDirection:
The direction of the I/O transfer. For example: kIODirectionOut, kIODirectionIn.
- withContiguousMemory:
A Boolean value that indicates whether to use a contiguous block of memory for the descriptor’s buffer.