class ArenaBase
Defined at line 127 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/arena.h
|ArenaBase| is the base class of all of the |Arena| classes. It is independent
of the initial buffer size. All the implementation is done here. The |Arena|
specializations only exist to define the initial buffer size.
The arena owns all the data which are allocated. That means that the
allocated data can be used by pure views. The allocated data are freed when
the arena is freed.
Users cannot directly call an arena's methods. Instead, they must do so via
|ObjectView|, |StringView| and |VectorView| classes, as well as generated
wire domain objects such as tables and unions. The allocation is first made
within the initial buffer. When the initial buffer is full (or, at least, the
next allocation doesn't fit in the remaining space), the arena allocates
extra buffers on the heap. If one allocation is bigger than the capacity of a
standard extra buffer, a tailored buffer is allocated which only contains the
allocation.
Allocations are put one after the other in the buffers. When a buffer can't
fit the next allocation, the remaining space is lost and another buffer is
allocated on the heap. Each allocation respects |FIDL_ALIGNMENT|. For
allocations which don't need a destructor, we only allocate the requested
size within the buffer. For allocations with a non trivial destructor, we
also allocate some space for a |struct Destructor| which is stored before the
requested data.
The constructor and destructor of |ArenaBase| are private to disallow direct
instantiation.
Friends
class ArenaChecker
template <size_t>
class Arena
template <typename T>
class VectorView
template <typename T>
class ObjectView