template <typename NodeType, typename Allocator>

class Allocations

Defined at line 64 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

Helper object for gathering all the allocations needed to perform an insert. Internally places

the allocations in an intrusively linked list until needed. Allocations must be registered, via

reserve, in the same order (i.e. size_bytes) that they are then retrieved with take_next.

Public Methods

void Allocations<NodeType, Allocator> (Allocator & allocator)

Defined at line 66 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

void ~Allocations<NodeType, Allocator> ()

Defined at line 67 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

void Allocations<NodeType, Allocator> (const Allocations<NodeType, Allocator> & )

Defined at line 77 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

void Allocations<NodeType, Allocator> (Allocations<NodeType, Allocator> && )

Defined at line 78 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

Allocations<NodeType, Allocator> & operator= (const Allocations<NodeType, Allocator> & )

Defined at line 79 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

Allocations<NodeType, Allocator> & operator= (Allocations<NodeType, Allocator> && )

Defined at line 80 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

bool reserve (size_t size_bytes)

Register another allocation. This will attempt the allocation and return false if it failed.

The allocation is added to the internal list.

Defined at line 84 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h

template <typename... Args>
NodeType * take_next (size_t size_bytes, Args &&... args)

Retrieves the next allocation in order. It is an error to call this if a matching reserve was

not already performed.

Defined at line 103 of file ../../zircon/kernel/lib/btree/include/lib/btree_util.h