Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
needs: build-base-with-docker
strategy:
matrix:
allocator: [ff, fg, gd, hd, hm, iso, je, kp, lf, lp, lt, mesh, mng, mi, mi2, mi3, nomesh, pa, rp, scudo, sm, sn, sg, tbb, tc, yal, tcg]
allocator: [ff, fg, gd, hd, hm, iso, je, kp, lf, lp, lt, mesh, mng, mi, mi2, mi3, nomesh, pa, rp, scudo, s, sm, sn, sg, tbb, tc, yal, tcg]
testsuite: [allt]
# Used to provide a platform-specific predicate
predicate: [true, false]
Expand Down
4 changes: 3 additions & 1 deletion bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Allocators and tests
# --------------------------------------------------------------------

readonly alloc_all="sys kp dh ff fg gd hd hm hml iso je lf lp lt mi mi-sec mi2 mi2-sec mi3 mi3-sec mng mesh nomesh pa rp sc scudo sg sm sn sn-sec tbb tc tcg mi-dbg mi2-dbg mi3-dbg xmi xsmi xmi-dbg yal rmalloc"
readonly alloc_all="sys kp dh ff fg gd hd hm hml iso je lf lp lt mi mi-sec mi2 mi2-sec mi3 mi3-sec mng mesh nomesh pa rp sc scudo sg sm sn sn-sec s tbb tc tcg mi-dbg mi2-dbg mi3-dbg xmi xsmi xmi-dbg yal rmalloc"
readonly alloc_secure="dh ff gd hm hml iso mi-sec mi2-sec mi3-sec mng pa scudo sg sn-sec sg"
alloc_run="" # allocators to run (expanded by command line options)
alloc_installed="sys" # later expanded to include all installed allocators
Expand Down Expand Up @@ -121,6 +121,7 @@ alloc_lib_add "scudo" "$localdevdir/scudo/compiler-rt/lib/scudo/standalone/libs
alloc_lib_add "sg" "$localdevdir/sg/libSlimGuard.so"
alloc_lib_add "sm" "$localdevdir/sm/release/lib/libsupermalloc$extso"
alloc_lib_add "sn" "$localdevdir/sn/release/libsnmallocshim$extso"
alloc_lib_add "s" "$localdevdir/s/target/release/libsmalloc_ffi$extso"
alloc_lib_add "sn-sec" "$localdevdir/sn/release/libsnmallocshim-checks$extso"
alloc_lib_add "tbb" "$lib_tbb"
alloc_lib_add "tc" "$localdevdir/tc/.libs/libtcmalloc_minimal$extso"
Expand Down Expand Up @@ -424,6 +425,7 @@ while : ; do
echo " sm use supermalloc"
echo " sn use snmalloc"
echo " sn-sec use secure version of snmalloc"
echo " s use smalloc"
echo " sys use system malloc ($libc)"
echo " tbb use Intel TBB malloc"
echo " tc use tcmalloc (from gperftools)"
Expand Down
26 changes: 22 additions & 4 deletions build-bench-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ readonly version_scudo=main
readonly version_sg=master # ~unmaintained since 2021
readonly version_sm=master # ~unmaintained since 2017
readonly version_sn=0.7.5
readonly version_s=v7.6.0
readonly version_tbb=v2023.1.0
readonly version_tc=gperftools-2.18
readonly version_tcg=81f4e44f23f2936303f9404fee7315119b9df623 # 2026-02-23
Expand All @@ -76,6 +77,7 @@ readonly version_rocksdb=10.10.1
readonly version_lua=v5.4.7
readonly version_linux=6.5.1
readonly version_bazel=8.8.0
readonly version_rust=1.87.0

# HTTP-downloaded files checksums
readonly sha256sum_sh6bench="506354d66b9eebef105d757e055bc55e8d4aea1e7b51faab3da35b0466c923a1"
Expand Down Expand Up @@ -107,6 +109,7 @@ setup_scudo=0
setup_sg=0
setup_sm=0
setup_sn=0
setup_s=0
setup_tbb=0
setup_tc=0
setup_tcg=0
Expand Down Expand Up @@ -153,6 +156,7 @@ while : ; do
setup_mi3=$flag_arg
setup_pa=$flag_arg
setup_sn=$flag_arg
setup_s=$flag_arg
setup_sg=$flag_arg
setup_tbb=$flag_arg
setup_tc=$flag_arg
Expand Down Expand Up @@ -249,6 +253,8 @@ while : ; do
setup_sm=$flag_arg;;
sn)
setup_sn=$flag_arg;;
s)
setup_s=$flag_arg;;
tbb)
setup_tbb=$flag_arg;;
tc)
Expand Down Expand Up @@ -295,6 +301,7 @@ while : ; do
echo " sg setup slimguard ($version_sg)"
echo " sm setup supermalloc ($version_sm)"
echo " sn setup snmalloc ($version_sn)"
echo " s setup smalloc ($version_s)"
echo " tbb setup Intel TBB malloc ($version_tbb)"
echo " tc setup tcmalloc ($version_tc)"
echo " tcg setup Google's tcmalloc ($version_tcg)"
Expand Down Expand Up @@ -459,7 +466,7 @@ if test "$setup_packages" = "1"; then
if grep -q 'ID=fedora' /etc/os-release 2>/dev/null; then
# no 'apt update' equivalent needed on Fedora
dnfinstall "gcc-c++ clang lld llvm-devel unzip dos2unix bc gmp-devel wget gawk \
cmake python3 ruby ninja-build libtool autoconf git patch time sed \
cmake python3 ruby cargo ninja-build libtool autoconf git patch time sed \
ghostscript libatomic libstdc++ libstdc++-static which gflags-devel xz readline-devel snappy-devel"
dnfinstallbazel
elif grep -q -e 'ID=debian' -e 'ID=ubuntu' /etc/os-release 2>/dev/null; then
Expand All @@ -469,19 +476,20 @@ if test "$setup_packages" = "1"; then
cmake python3 ruby ninja-build libtool autoconf sed ghostscript time \
curl automake libatomic1 libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev \
liblz4-dev libzstd-dev libreadline-dev pkg-config gawk util-linux"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain $version_rust
aptinstallbazel
elif grep -q -e 'ID=alpine' /etc/os-release 2>/dev/null; then
echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apkinstall "clang lld unzip dos2unix bc gmp-dev wget cmake python3 automake gawk \
samurai libtool git build-base linux-headers autoconf util-linux sed \
samurai libtool git cargo build-base linux-headers autoconf util-linux sed \
ghostscript libatomic gflags-dev readline-dev snappy-dev"
apkinstall "bazel@testing"
elif brew --version 2> /dev/null >/dev/null; then
brewinstall "dos2unix wget cmake ninja automake libtool gnu-time gmp mpir gnu-sed \
ghostscript bazelisk gflags snappy"
ghostscript bazelisk gflags snappy rust"
elif grep -q 'Arch Linux' /etc/os-release; then
sudo pacman -S dos2unix wget cmake ninja automake libtool time gmp sed ghostscript bazelisk gflags snappy
sudo pacman -S dos2unix wget cmake ninja automake libtool time gmp sed ghostscript bazelisk gflags snappy rust
fi
fi

Expand Down Expand Up @@ -710,6 +718,16 @@ if test "$setup_sn" = "1"; then
popd
fi

if test "$setup_s" = "1"; then
checkout s $version_s https://github.com/zooko/smalloc
cargo_cmd=cargo
if test -x "$HOME/.cargo/bin/cargo"; then
cargo_cmd="$HOME/.cargo/bin/cargo"
fi
"$cargo_cmd" build --release --package smalloc-ffi
popd
fi

if test "$setup_sm" = "1"; then
checkout sm $version_sm https://github.com/kuszmaul/SuperMalloc
rm -rf ./doc ./paper "./short-talk"
Expand Down