Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add malloc-ng #55

Merged
merged 1 commit into from
Nov 21, 2021
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
4 changes: 3 additions & 1 deletion bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo ""
# Allocators and tests
# --------------------------------------------------------------------

alloc_all="sys je xmi mi tc sp sm sn tbb hd mesh nomesh tlsf sc scudo hm iso dmi smi xdmi xsmi"
alloc_all="sys je xmi mi tc sp sm sn tbb hd mesh nomesh tlsf sc scudo hm iso dmi smi xdmi xsmi mallocng"
alloc_run="" # allocators to run (expanded by command line options)
alloc_installed="sys" # later expanded to include all installed allocators
alloc_libs="sys=" # mapping from allocator to its .so as "<allocator>=<sofile> ..."
Expand Down Expand Up @@ -102,6 +102,7 @@ alloc_lib_add "tc" "$localdevdir/gperftools/.libs/libtcmalloc_minimal$extso"
alloc_lib_add "sc" "$localdevdir/scalloc/out/Release/lib.target/libscalloc$extso"
alloc_lib_add "iso" "${localdevdir}/iso/build/libisoalloc$extso"
alloc_lib_add "scudo" "${localdevdir}/scudo/compiler-rt/lib/scudo/standalone/libscudo$extso"
alloc_lib_add "mallocng" "${localdevdir}/mallocng/libmallocng$extso"
alloc_lib_add "hm" "${localdevdir}/hm/libhardened_malloc$extso"
lib_rp="`find ${localdevdir}/rpmalloc/bin/*/release -name librpmallocwrap$extso 2> /dev/null`"
alloc_lib_add "rp" "$lib_rp"
Expand Down Expand Up @@ -313,6 +314,7 @@ while : ; do
echo " rp use rpmalloc"
echo " tbb use Intel TBB malloc"
echo " scudo use scudo"
echo " mallocng use mallocng"
echo " hm use hardened_malloc"
echo " iso use isoalloc"
echo " dmi use debug version of mimalloc"
Expand Down
12 changes: 12 additions & 0 deletions build-bench-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ version_mi=v1.7.3
version_rp=1.4.3
version_tbb=v2021.4.0 # v2020.3
version_scudo=main
version_mallocng=master
version_hm=main
version_iso=1.0.0
version_hd=5afe855 # 3.13 #a43ac40 #d880f72 #9d137ef37
Expand All @@ -40,6 +41,7 @@ version_redis=6.0.9

# allocators
setup_scudo=0
setup_mallocng=0
setup_hm=0
setup_iso=0
setup_je=0
Expand Down Expand Up @@ -92,6 +94,7 @@ while : ; do
setup_rp=$flag_arg
setup_sm=$flag_arg
setup_mesh=$flag_arg
setup_mallocng=$flag_arg # lacking getentropy()
fi
# only run Mesh's 'nomesh' configuration if asked
# setup_nomesh=$flag_arg
Expand All @@ -102,6 +105,8 @@ while : ; do
#setup_ch=$flag_arg
setup_packages=$flag_arg
;;
mallocng)
setup_mallocng=$flag_arg;;
scudo)
setup_scudo=$flag_arg;;
hm)
Expand Down Expand Up @@ -156,6 +161,7 @@ while : ; do
echo " --rebuild force re-clone and re-build for given tools"
echo ""
echo " scudo setup scudo ($version_scudo)"
echo " mallocng setup mallocng ($version_mallocng)"
echo " hm setup hardened_malloc ($version_hm)"
echo " iso setup isoalloc ($version_iso)"
echo " je setup jemalloc ($version_je)"
Expand Down Expand Up @@ -313,6 +319,12 @@ if test "$setup_iso" = "1"; then
popd
fi

if test "$setup_mallocng" = "1"; then
checkout mallocng $version_mallocng mallocng https://github.com/richfelker/mallocng-draft
make
popd
fi

if test "$setup_scudo" = "1"; then
partial_checkout scudo $version_scudo scudo https://github.com/llvm/llvm-project "compiler-rt/lib/scudo/standalone"
cd "compiler-rt/lib/scudo/standalone"
Expand Down