Compile with jemalloc to reduce memory allocator contention
The jemalloc allocator is scalable high performance allocator, this is the first in the series of commits that will add jemalloc as a memory allocator for BIND 9. This commit adds configure.ac check and Makefile modifications to use jemalloc as BIND 9 allocator.
This commit is contained in:
11
configure.ac
11
configure.ac
@@ -1376,6 +1376,17 @@ AC_SUBST([CMOCKA_LIBS])
|
||||
|
||||
AM_CONDITIONAL([HAVE_CMOCKA], [test "$with_cmocka" = "yes"])
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
AC_MSG_CHECKING([for jemalloc])
|
||||
PKG_CHECK_MODULES([JEMALLOC], [jemalloc >= 5], []
|
||||
[AC_MSG_WARN([Using jemalloc 5 is recommended])
|
||||
PKG_CHECK_MODULES([JEMALLOC], [jemalloc], [],
|
||||
[AC_MSG_ERROR([jemalloc not found])])])
|
||||
AC_SUBST([JEMALLOC_CFLAGS])
|
||||
AC_SUBST([JEMALLOC_LIBS])
|
||||
|
||||
#
|
||||
# was --with-tuning specified?
|
||||
#
|
||||
|
||||
@@ -230,6 +230,7 @@ libisc_la_SOURCES = \
|
||||
|
||||
libisc_la_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
$(JEMALLOC_CPPFLAGS) \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBUV_CFLAGS) \
|
||||
$(OPENSSL_CFLAGS) \
|
||||
@@ -240,6 +241,7 @@ libisc_la_LDFLAGS = \
|
||||
-release "$(PACKAGE_VERSION)"
|
||||
|
||||
libisc_la_LIBADD = \
|
||||
$(JEMALLOC_LIBS) \
|
||||
$(LIBUV_LIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
$(ZLIB_LIBS)
|
||||
|
||||
Reference in New Issue
Block a user