2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

preen data structure survey

Tony Finch
2022-03-30 11:11:41 +01:00
parent 652b8beb5a
commit 802227a044

@@ -28,58 +28,59 @@ disclaimers
-----------
My personal interest is the work I have done over the last several
years on my "[qp-trie][]" data structure, and the variants that have
been tuned to work well with DNS names as keys, and for copy-on-write
concurrency. I prototyped these variants in [my fork of NSD][],
because it is simpler than BIND, and it already has a choice between a
red-black tree and a radix tree, so adding a qp-trie was not too hard.
years on my "[qp-trie][]" data structure, and the qp-trie variants
that have been tuned to work well with DNS names as keys, and for
copy-on-write concurrency. I prototyped these variants in [my fork of
NSD][], because it is simpler than BIND, and it already has a choice
between a red-black tree and a radix tree, so adding a qp-trie was not
too hard.
[qp-trie]: https://dotat.at/prog/qp
[my fork of NSD]: QPtrie-in-NSD
I am writing these notes as myself because they are primarily a
learning exercise for myself, though I hope they might also be useful
to others. It is easier not to worry about mistakes or inaccuracies if
I am not trying to present this as the consensus of the BIND
developers. And there is a date at the top because there's a fair
chance this will become a historical document rather than being
I am writing these notes with a personal point of view because they
are primarily a learning exercise for myself, though I hope they might
also be useful to others. (It is easier not to worry about mistakes or
inaccuracies if I am not trying to present this as the consensus of
the BIND developers.) And there is a date at the top because there's a
fair chance this will become a historical document rather than being
maintained as a current one.
# `lib/isc/astack`
# `isc/astack`
Fixed-size array stack
## used by
* `lib/isc/netmgr/netmgr`
* `isc/netmgr/netmgr`
# `lib/isc/heap`
# `isc/heap`
Priority queue
## used by
* `lib/dns/rbtdb`
* `lib/dns/zoneverify`
* `lib/isc/timer`
* `dns/rbtdb`
* `dns/zoneverify`
* `isc/timer`
## notes
No locking / single-threaded.
# `lib/isc/ht`
# `isc/ht`
Hash table
## used by
* `bin/plugins/filter-a` and `bin/plugins/filter-aaaa`
* `lib/dns/catz` (which leaks into `bin/named/server`)
* `lib/dns/rpz`
* `lib/isc/tls`
* `dns/catz` (which leaks into `bin/named/server`)
* `dns/rpz`
* `isc/tls`
## notes
@@ -89,14 +90,14 @@ Uses chaining, so it is heavy on indirection and heavy on allocation.
Modern hash tables use open addressing.
# `lib/isc/radix`
# `isc/radix`
Radix tree for IP address prefix matching
## used by
* `lib/dns/acl`
* `lib/dns/iptable`
* `dns/acl`
* `dns/iptable`
## notes