]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: Makefile: remove outdated support for dlmalloc
authorWilly Tarreau <w@1wt.eu>
Wed, 27 Mar 2019 13:20:43 +0000 (14:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 27 Mar 2019 13:30:15 +0000 (14:30 +0100)
dlmalloc has remained unused for quite a while now, in part because it
is not thread-safe and in part because it has been superseded by the
much better and faster jemalloc. So let's simplify the makefile and
remove entries related to this library.

INSTALL
Makefile

diff --git a/INSTALL b/INSTALL
index cf3f1dfbb85c442901b8a92e24f1ef54b1dd7b9f..b7a8c4c0fa5186142ffc9b61b243315557d408fe 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -146,13 +146,9 @@ Optional dependencies may be split into several categories :
 4.1) Memory allocation
 ----------------------
 By default, HAProxy uses the standard malloc() call provided by the libc. It
-may be built to use dlmalloc instead. In this case, "USE_DLMALLOC=1" needs to
-be appended to the build options, and "DLMALLOC_SRC" needs to point to the
-absolute path to "dlmalloc.c". Doing this is not safe when using threads.
-HAProxy may also be built to use jemalloc, which is fast and thread-safe.
-In order to use it, please add "-ljemalloc" to the ADDLIB variable. You may
-possibly also need to append "-lpthread" and/or "-ldl" depending on the
-operating system.
+may also be built to use jemalloc, which is fast and thread-safe. In order to
+use it, please add "-ljemalloc" to the ADDLIB variable. You may possibly also
+need to append "-lpthread" and/or "-ldl" depending on the operating system.
 
 
 4.2) Regular expressions
index 852338c4e9d8e02d0805d745a602993f698875d9..9f2c9bce455cd9170a46914ed0918f9b1d4ce6a2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,6 @@
 #
 # Valid USE_* options are the following. Most of them are automatically set by
 # the TARGET, others have to be explicitly specified :
-#   USE_DLMALLOC         : enable use of dlmalloc (see DLMALLOC_SRC)
 #   USE_EPOLL            : enable epoll() on Linux 2.6. Automatic.
 #   USE_KQUEUE           : enable kqueue() on BSD. Automatic.
 #   USE_MY_EPOLL         : redefine epoll_* syscalls. Automatic.
@@ -80,8 +79,6 @@
 #           installation only.
 #
 # Other variables :
-#   DLMALLOC_SRC   : build with dlmalloc, indicate the location of dlmalloc.c.
-#   DLMALLOC_THRES : should match PAGE_SIZE on every platform (default: 4096).
 #   PCRE_CONFIG    : force the binary path to get pcre config (by default
 #                                                              pcre-config)
 #   PCREDIR        : force the path to libpcre.
@@ -606,24 +603,6 @@ BUILD_OPTIONS   += $(call ignore_implicit,USE_RT)
 OPTIONS_LDFLAGS += -lrt
 endif
 
-# report DLMALLOC_SRC only if explicitly specified
-ifneq ($(DLMALLOC_SRC),)
-BUILD_OPTIONS += DLMALLOC_SRC=$(DLMALLOC_SRC)
-endif
-
-ifneq ($(USE_DLMALLOC),)
-BUILD_OPTIONS  += $(call ignore_implicit,USE_DLMALLOC)
-ifeq ($(DLMALLOC_SRC),)
-DLMALLOC_SRC=src/dlmalloc.c
-endif
-endif
-
-ifneq ($(DLMALLOC_SRC),)
-# DLMALLOC_THRES may be changed to match PAGE_SIZE on every platform
-DLMALLOC_THRES = 4096
-OPTIONS_OBJS  += src/dlmalloc.o
-endif
-
 ifneq ($(USE_OPENSSL),)
 # OpenSSL is packaged in various forms and with various dependencies.
 # In general -lssl is enough, but on some platforms, -lcrypto may be needed,
@@ -969,9 +948,6 @@ src/haproxy.o:      src/haproxy.c $(DEP)
              -DBUILD_OPTIONS='"$(strip $(BUILD_OPTIONS))"' \
               -c -o $@ $<
 
-src/dlmalloc.o: $(DLMALLOC_SRC) $(DEP)
-       $(cmd_CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
-
 install-man:
        $(Q)install -v -d "$(DESTDIR)$(MANDIR)"/man1
        $(Q)install -v -m 644 doc/haproxy.1 "$(DESTDIR)$(MANDIR)"/man1