Contents

withBytes

Creates a buffer memory descriptor and fills it with the specified bytes.

Declaration

static OSPtr<IOBufferMemoryDescriptor> withBytes(const void *bytes, vm_size_t withLength, IODirection withDirection, bool withContiguousMemory);

Parameters

  • bytes:

    The bytes to copy into the newly allocated buffer.

  • withLength:

    The number of bytes in the bytes parameter.

  • 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.

See Also

Creating a Memory Buffer Descriptor