class VmoBuffer

Defined at line 19 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

Block-aligned VMO-backed buffer registered with the underlying device.

This class is movable but not copyable.

This class is thread-compatible.

Public Methods

void VmoBuffer (VmoBuffer && other)

Defined at line 16 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc

void VmoBuffer ()

Defined at line 21 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

void VmoBuffer (VmoidRegistry * registry, fzl::OwnedVmoMapper mapper, vmoid_t vmoid, size_t capacity, uint32_t block_size)

Constructor for a pre-registered VMO.

Prefer using |VmoBuffer.Initialize|.

Defined at line 25 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

VmoBuffer & operator= (VmoBuffer && other)

Defined at line 25 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc

void VmoBuffer (const VmoBuffer & )

Defined at line 33 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

VmoBuffer & operator= (const VmoBuffer & )

Defined at line 34 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

void ~VmoBuffer ()

Defined at line 38 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc

const zx::vmo & vmo ()

Returns a const view of the underlying VMO.

Defined at line 49 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

size_t capacity ()

BlockBuffer interface:

Defined at line 53 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

zx_status_t Initialize (VmoidRegistry * vmoid_registry, size_t blocks, uint32_t block_size, const char * label)

Initializes the buffer VMO with |blocks| blocks of size |block_size|.

Returns an error if the VMO cannot be created, mapped, or attached to the

underlying storage device.

Should only be called on VmoBuffers which have not been initialized already.

Defined at line 53 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc

uint32_t BlockSize ()

Defined at line 55 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

vmoid_t vmoid ()

Defined at line 57 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

zx_handle_t Vmo ()

Expected callers should access this object through the vmoid (registered

with a block device).

Defined at line 61 of file ../../zircon/system/ulib/storage/buffer/include/storage/buffer/vmo_buffer.h

void * Data (size_t index)

Defined at line 77 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc

const void * Data (size_t index)

Defined at line 81 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc

zx_status_t Zero (size_t index, size_t count)

Defined at line 87 of file ../../zircon/system/ulib/storage/buffer/vmo_buffer.cc