diff --git a/config.mk b/config.mk index 4bd74923..8a59ce94 100644 --- a/config.mk +++ b/config.mk @@ -111,6 +111,9 @@ WITH_CJSON:=yes # Build mosquitto with support for the $CONTROL topics. WITH_CONTROL:=yes +# Build the broker with the jemalloc allocator +WITH_JEMALLOC:=no + # ============================================================================= # End of user configuration # ============================================================================= @@ -301,6 +304,10 @@ ifeq ($(WITH_DOCS),yes) MAKE_ALL:=$(MAKE_ALL) docs endif +ifeq ($(WITH_JEMALLOC),yes) + BROKER_LDADD:=$(BROKER_LDADD) -ljemalloc +endif + ifeq ($(WITH_UNIX_SOCKETS),yes) BROKER_CPPFLAGS:=$(BROKER_CPPFLAGS) -DWITH_UNIX_SOCKETS LIB_CPPFLAGS:=$(LIB_CPPFLAGS) -DWITH_UNIX_SOCKETS