From: Ondřej Surý Date: Tue, 5 Sep 2023 12:32:26 +0000 (+0200) Subject: Ignore jemalloc versions before 4.0.0 X-Git-Tag: v9.19.17~11^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d862f4bc64a062132d0adb46c1b45f73c9a29760;p=thirdparty%2Fbind9.git Ignore jemalloc versions before 4.0.0 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+. --- diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 6f5466daa60..bffe2a9e6d9 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -52,11 +52,6 @@ #elif defined(HAVE_JEMALLOC) #include #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 diff --git a/m4/ax_jemalloc.m4 b/m4/ax_jemalloc.m4 index b400178da84..a15ae68a2d2 100644 --- a/m4/ax_jemalloc.m4 +++ b/m4/ax_jemalloc.m4 @@ -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"],