Project: /_project.yaml Book: /_book.yaml

fuchsia.mem

STRUCTS

Buffer {:#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.

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.

Range {:#Range}

Defined in fuchsia.mem/range.fidl

A range of bytes within a VMO.

For example, if offset is zero, then the first byte in the range is the first byte in the VMO.

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.

XUNIONS

Data {:#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).