fuchsia.mem

STRUCTS

Buffer

Defined in fuchsia.mem/buffer.fidl

A buffer for data whose size is not necessarily a multiple of the page size.

VMO objects have a physical size that is always a multiple of the page size. As such, VMO alone cannot serve as a buffer for arbitrarly sized data. fuchsia.mem.Buffer is a standard struct that aggregate the VMO and its size.

NameTypeDescriptionDefault
vmo handle<vmo> The vmo that contains the buffer. No default
size uint64 The number of bytes in the buffer. The content of the buffer begin at the start of the VMO and continue for `size` bytes. To specify a range of bytes that do not start at the beginning of the VMO, use `Range` rather than buffer. This size must not be greater than the physical size of the VMO. No default

Range

Defined in fuchsia.mem/range.fidl

A range of bytes within a VMO.

NameTypeDescriptionDefault
vmo handle<vmo> The vmo that contains the bytes. No default
offset uint64 The offset of the first byte within the range relative to the start of the VMO. For example, if `offset` is zero, then the first byte in the range is the first byte in the VMO. No default
size uint64 The number of bytes in the range. For example, if the offset is 3 and the size is 2, and the VMO starts with "abcdefg...", then the range contains "de". The sum of the offset and the size must not be greater than the physical size of the VMO. No default

XUNIONS

Data

Defined in fuchsia.mem/buffer.fidl

Binary data that might be stored inline or in a VMO.

Useful for performance-sensitive protocols that sometimes receive small amounts of binary data (i.e., which is more efficient to provide using bytes) but also need to support arbitrary amounts of data (i.e., which need to be provided out-of-line in a Buffer).

NameTypeDescription
bytes vector<uint8> The binary data provided inline in the message.
buffer Buffer The binary data provided out-of-line in a `Buffer`.