class HandleTableArena

Defined at line 99 of file ../../src/devices/bin/driver_runtime/handle.h

HandleTableArena provides the memory backing the Handle objects.

This class is thread-safe.

Public Members

static const size_t kMaxNumHandles
static const size_t kNumTables
static const size_t kHandlesPerTable

Public Methods

void HandleTableArena ()

Defined at line 108 of file ../../src/devices/bin/driver_runtime/handle.h

void ~HandleTableArena ()

Defined at line 110 of file ../../src/devices/bin/driver_runtime/handle.h

void Delete (Handle * handle)

Clears handle state specific to this lifetime and adds the handle to the free

list for re-use.

Defined at line 130 of file ../../src/devices/bin/driver_runtime/handle.h

Handle * Alloc (fdf_handle_t * out_handle_value)

Alloc returns storage for a handle.

|out_handle_value| is the generated handle value referring to the returned Handle object.

Defined at line 150 of file ../../src/devices/bin/driver_runtime/handle.cc

fit::nullable<Handle *> GetExistingHandle (uint32_t table, uint32_t index)

Returns the handle located in the handle table pointed to by |table|, at |index|.

Returns nullptr if the indexes are invalid, or do not point to an allocated handle.

Defined at line 101 of file ../../src/devices/bin/driver_runtime/handle.cc

uint32_t num_allocated ()

Returns the number of handles currently allocated (does not include freed handles).

Defined at line 143 of file ../../src/devices/bin/driver_runtime/handle.h