HomeFreeBSD

Introduce arb(3), the Array-based Red-Black Tree macros: similar

Description

Introduce arb(3), the Array-based Red-Black Tree macros: similar
to the traditional tree(3) RB trees, but using an array (preallocated,
linear chunk of memory) to store the tree.

This avoids allocation overhead, improves memory locality,
and makes it trivially easy to share/transfer/copy the entire tree
without the need for marshalling. The downside is that the size
is fixed at initialization time; there is no mechanism to resize
it.

This is one of the dependencies for the new stats(3) framework
(https://reviews.freebsd.org/D20477).

Reviewed by: bcr (man pages), markj
Discussed with: cem
MFC after: 2 weeks
Sponsored by: Klara Inc, Netflix
Obtained from: Netflix
Differential Revision: https://reviews.freebsd.org/D20324

Details

Provenance
traszAuthored on
Reviewer
bcr
Differential Revision
D20324: Introduce the ARB tree(3) macros
Parents
rS352336: Work around gcc's inability to compile an incomplete type in googletest,
Branches
Unknown
Tags
Unknown