class Buffer

Defined at line 117 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-pool.h

Finds the next available buffer, locks that buffer for writing, and

returns a Buffer instance to allow access to that buffer.

If no buffers are available, returns an empty std::optional.

Public Methods

void ~Buffer ()

Defined at line 76 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

void Buffer (Buffer && other)

Only allow move constructors.

Defined at line 13 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

Buffer & operator= (Buffer && other)

Defined at line 18 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

uint32_t ReleaseWriteLockAndGetIndex ()

Release the buffer from its write lock, which puts the Buffer instance

in the invalid state. If the Buffer was in a valid state before the call,

this will return the index of the Buffer. Calling ReleaseBuffer with

this index is now the only way to release the buffer.

Asserts that the Buffer is valid.

Defined at line 61 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

zx_status_t Release ()

Releases buffer back to free pool.

Defined at line 69 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

size_t size ()

Returns the size of the buffer. Asserts that the Buffer instance is

valid.

Defined at line 28 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

void * virtual_address ()

Return the virtual address to the start of the buffer.

Asserts that the buffer is mapped, and that the Buffer instance

is valid.

Defined at line 33 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

zx_paddr_t physical_address ()

Return the physical address of the start of the buffer.a

Asserts that the buffer is pinned, and that the Buffer instance is

valid.

Defined at line 43 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

zx_handle_t vmo_handle ()

Return the vmo handle.

Asserts that the Buffer instance is valid.

Defined at line 48 of file ../../zircon/system/ulib/fzl/vmo-pool.cc

void Buffer ()

Default constructor creates an invalid Buffer:

Defined at line 120 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-pool.h

bool valid ()

Defined at line 157 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-pool.h

Friends

std::optional<Buffer> Buffer ()