]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ignore jemalloc versions before 4.0.0
authorOndřej Surý <ondrej@isc.org>
Tue, 5 Sep 2023 12:32:26 +0000 (14:32 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 5 Sep 2023 16:46:57 +0000 (18:46 +0200)
We now depend on explicitly creating memory arenas and disabling tcache
on those, and these features are not available with jemalloc < 4.
Instead of working around these issues, make the jemalloc >= 4.0.0 hard
requirement by looking for sdallocx() symbol that's only available from
that version.

The jemalloc < 4 was only used by RHEL 7 which is not supported since
BIND 9.19+.

lib/isc/mem.c
m4/ax_jemalloc.m4

index 6f5466daa60b94bf5a241110833767f389e52835..bffe2a9e6d9079f23805871117907663ccfa5eaa 100644 (file)
 #elif defined(HAVE_JEMALLOC)
 #include <jemalloc/jemalloc.h>
 #define JEMALLOC_API_SUPPORTED 1
-
-#if JEMALLOC_VERSION_MAJOR < 4
-#define sdallocx(ptr, size, flags) dallocx(ptr, flags)
-#endif /* JEMALLOC_VERSION_MAJOR < 4 */
-
 #else
 #include "jemalloc_shim.h"
 #endif
index b400178da849f71ce6471fab2081a93876141e5a..a15ae68a2d2744ce0614c4dd251768402ac4ffa1 100644 (file)
@@ -36,7 +36,7 @@ AC_DEFUN([AX_CHECK_JEMALLOC], [
                    save_LIBS="$LIBS"
                    save_LDFLAGS="$LDFLAGS"
                    save_CPPFLAGS="$CPPFLAGS"
-                   AC_SEARCH_LIBS([mallocx], [jemalloc],
+                   AC_SEARCH_LIBS([sdallocx], [jemalloc],
                        [
                            found=true
                            AS_IF([test "$ac_cv_search_mallocx" != "none required"],