File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -713,10 +713,14 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
713713 FLB_DEFINITION(FLB_HAVE_JEMALLOC)
714714 FLB_DEFINITION(JEMALLOC_MANGLE)
715715
716+ # Add support for options like page size
717+ set (FLB_JEMALLOC_OPTIONS "--with-lg-quantum=3" CACHE string "Extra options to configure jemalloc" )
718+ message (STATUS "jemalloc configuration: \" ${FLB_JEMALLOC_OPTIONS} \" " )
719+
716720 # Link to Jemalloc as an external dependency
717721 ExternalProject_Add(jemalloc
718722 SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib/jemalloc-5.2.1
719- CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} --with-lg-quantum=3 --prefix =<INSTALL_DIR>
723+ CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /lib/jemalloc-5.2.1/configure ${AUTOCONF_HOST_OPT} ${FLB_JEMALLOC_OPTIONS} --prefix =<INSTALL_DIR>
720724 CFLAGS=-std=gnu99\ -Wall\ -pipe\ -g3\ -O3\ -funroll-loops
721725 BUILD_COMMAND $(MAKE)
722726 INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR} /
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ RUN yum -y update && \
4646ARG FLB_OUT_PGSQL=Off
4747ENV FLB_OUT_PGSQL=$FLB_OUT_PGSQL
4848
49+ # Need larger page size
50+ ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3"
51+ ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS
52+
4953# centos/8 base image
5054FROM centos:8 as centos-8-base
5155
@@ -90,6 +94,10 @@ RUN yum -y update && \
9094ARG FLB_OUT_PGSQL=On
9195ENV FLB_OUT_PGSQL=$FLB_OUT_PGSQL
9296
97+ # Need larger page size
98+ ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3"
99+ ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS
100+
93101# Common build for all distributions now
94102# hadolint ignore=DL3006
95103FROM $BASE_BUILDER as builder
@@ -134,6 +142,7 @@ RUN cmake3 -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
134142 -DFLB_OUT_KAFKA="$FLB_OUT_KAFKA" \
135143 -DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \
136144 -DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
145+ -DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
137146 ../
138147
139148VOLUME [ "/output" ]
You can’t perform that action at this time.
0 commit comments