BUILD: Makefile: remove outdated support for dlmalloc
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.
diff --git a/INSTALL b/INSTALL
index cf3f1df..b7a8c4c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -146,13 +146,9 @@
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
diff --git a/Makefile b/Makefile
index 852338c..9f2c9bc 100644
--- 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 @@
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 @@
-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