Skip to content

Commit

Permalink
[BugFix] build jemalloc with 64K pagesize for arm arch (StarRocks#21697)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com>
  • Loading branch information
kevincai authored Apr 18, 2023
1 parent 4ebfff5 commit 2d58854
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,16 @@ build_jemalloc() {
unset CFLAGS
export CFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g"
cd $TP_SOURCE_DIR/$JEMALLOC_SOURCE
./configure --prefix=${TP_INSTALL_DIR} --with-jemalloc-prefix=je --enable-prof --disable-cxx --disable-libdl --disable-shared
# jemalloc supports a runtime page size that's smaller or equal to the build
# time one, but aborts on a larger one. If not defined, it falls back to the
# the build system's _SC_PAGESIZE, which in many architectures can vary. Set
# this to 64K (2^16) for arm architecture, and default 4K on x86 for performance.
local addition_opts=" --with-lg-page=12"
if [[ $MACHINE_TYPE == "aarch64" ]] ; then
# change to 64K for arm architecture
addition_opts=" --with-lg-page=16"
fi
./configure --prefix=${TP_INSTALL_DIR} --with-jemalloc-prefix=je --enable-prof --disable-cxx --disable-libdl --disable-shared $addition_opts
make -j$PARALLEL
make install
mv $TP_INSTALL_DIR/lib/libjemalloc.a $TP_INSTALL_DIR/lib/libjemalloc_for_starrocks.a
Expand Down

0 comments on commit 2d58854

Please sign in to comment.