From 137f3528505a28c2943cf57afdd8331df36a1eaa Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Fri, 15 Aug 2025 22:17:37 +0200 Subject: [PATCH] chore: configure jemalloc max page size correctly --- .docker/install-static-libs.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.docker/install-static-libs.sh b/.docker/install-static-libs.sh index f89a38f9..62a8fd24 100644 --- a/.docker/install-static-libs.sh +++ b/.docker/install-static-libs.sh @@ -252,6 +252,11 @@ for target_arch in ${TARGET_ARCH_STR//,/ }; do ppc64*) BOOST_CONTEXT_ARCH="ppc64" ;; esac + case "$CARCH" in + i386|x86_64) MAX_LG_PAGE_SIZE=12 ;; + *) MAX_LG_PAGE_SIZE=16 ;; + esac + export TARGET="${CARCH}-alpine-linux-musl" case "$CARCH" in @@ -449,14 +454,16 @@ EOF ./autogen.sh ${TRIPLETS} mkdir build-minimal cd build-minimal - ../configure ${TRIPLETS} --prefix="$INSTALL_ROOT/$COMPILER-jemalloc-minimal/$TARGET" --localstatedir=/var --sysconfdir=/etc --with-lg-hugepage=21 \ + ../configure ${TRIPLETS} --prefix="$INSTALL_ROOT/$COMPILER-jemalloc-minimal/$TARGET" --localstatedir=/var \ + --sysconfdir=/etc --with-lg-page=$MAX_LG_PAGE_SIZE --with-lg-hugepage=21 \ --disable-stats --disable-prof --enable-static --disable-shared --disable-log --disable-debug make -j$(nproc) make install cd .. mkdir build-full cd build-full - ../configure ${TRIPLETS} --prefix="$INSTALL_ROOT/$COMPILER-jemalloc-full/$TARGET" --localstatedir=/var --sysconfdir=/etc --with-lg-hugepage=21 \ + ../configure ${TRIPLETS} --prefix="$INSTALL_ROOT/$COMPILER-jemalloc-full/$TARGET" --localstatedir=/var \ + --sysconfdir=/etc --with-lg-page=$MAX_LG_PAGE_SIZE --with-lg-hugepage=21 \ --enable-stats --enable-prof --enable-static --disable-shared --disable-log --disable-debug make -j$(nproc) make install