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.
This commit is contained in:
Willy Tarreau 2019-03-27 14:20:43 +01:00
parent 9fc5cc609d
commit c3643517f3
2 changed files with 3 additions and 31 deletions

10
INSTALL
View File

@ -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

View File

@ -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