]> git.ipfire.org Git - thirdparty/bind9.git/commit
Replace locked mempools with memory contexts
authorOndřej Surý <ondrej@sury.org>
Wed, 12 May 2021 19:16:17 +0000 (21:16 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 9 Jul 2021 13:58:02 +0000 (15:58 +0200)
commitf487c6948b65bfb34bbfac9665f375543a5f34e6
tree9ea4ebf94b9b26732fcfe3faae744f928831ab74
parentfd3ceec4752210a16c089ab4efd8201c78b39642
Replace locked mempools with memory contexts

Current mempools are kind of hybrid structures - they serve two
purposes:

 1. mempool with a lock is basically static sized allocator with
    pre-allocated free items

 2. mempool without a lock is a doubly-linked list of preallocated items

The first kind of usage could be easily replaced with jemalloc small
sized arena objects and thread-local caches.

The second usage not-so-much and we need to keep this (in
libdns:message.c) for performance reasons.
12 files changed:
bin/dig/dighost.c
bin/plugins/filter-a.c
bin/plugins/filter-aaaa.c
bin/tests/system/hooks/driver/test-async.c
lib/dns/adb.c
lib/dns/dispatch.c
lib/dns/tests/dispatch_test.c
lib/isc/include/isc/mem.h
lib/isc/mem.c
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/tests/mem_test.c