]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make it possible to create memory contexts backed by jemalloc arenas
authorArtem Boldariev <artem@boldariev.com>
Thu, 10 Aug 2023 14:02:43 +0000 (17:02 +0300)
committerOndřej Surý <ondrej@isc.org>
Tue, 5 Sep 2023 13:02:30 +0000 (15:02 +0200)
commit16a45837ca4321eaec9e665cc76539dcb2e2ef0e
tree3f3f87e05fedd15b057feef9b500452978179bd4
parent6d24650333d90cc9ae6418b468d0934e7d718ed2
Make it possible to create memory contexts backed by jemalloc arenas

This commit extends the internal memory management middleware code in
BIND so that memory contexts backed by dedicated jemalloc arenas can
be created. A new function (isc_mem_create_arena()) is added for that.

Moreover, it extends the existing code so that specialised memory
contexts can be created easily, should we need that functionality for
other future purposes. We have achieved that by passing the flags to
the underlying jemalloc-related calls. See the above
isc_mem_create_arena(), which can serve as an example of this.

Having this opens up possibilities for creating memory contexts tuned
for specific needs.

(cherry picked from commit 8550c525881da757ac7db12990c2c1e0c72ec13c)
lib/isc/include/isc/mem.h
lib/isc/jemalloc_shim.h
lib/isc/mem.c