2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

more in the data structure survey

Tony Finch 2022-03-30 16:51:08 +01:00
parent 802227a044
commit 889c528e88

@ -55,6 +55,10 @@ Fixed-size array stack
* `isc/netmgr/netmgr`
## notes
Locked.
# `isc/heap`
@ -68,7 +72,7 @@ Priority queue
## notes
No locking / single-threaded.
Single-threaded.
# `isc/ht`
@ -84,12 +88,26 @@ Hash table
## notes
No locking / single-threaded.
Single-threaded.
Uses chaining, so it is heavy on indirection and heavy on allocation.
Modern hash tables use open addressing.
# `isc/pool`
A mechanism for sharing a small pool of fungible objects among a large
number of objects that depend on them.
## used by
* `dns/zone` for sharing memory contexts
## notes
Single-threaded.
# `isc/radix`
Radix tree for IP address prefix matching
@ -101,6 +119,8 @@ Radix tree for IP address prefix matching
## notes
Single-threaded.
Slightly unusual because it is first-match rather than best-match.
Tests one bit at a time so there's an opportunity to improve with
@ -108,3 +128,25 @@ Tests one bit at a time so there's an opportunity to improve with
The nodes appear to be larger than necessary; is this a problem?
How big do ACLs get?
Uses reserved identifiers for static functions, which is undefined
behaviour.
# `isc/taskpool`
Like `isc/pool`, but specialized for tasks
## used by
* `dns/zone` for sharing tasks
## notes
Single-threaded.
Should probably be replaced by the more generic `isc/pool` (it looks
like that was the plan when `isc/pool` was added).
There appears to be a bug in `isc_taskpool_expand()` when it fails to
create a new task: the existing taskpool will be left empty.