Skip to content

Commit bd58d24

Browse files
committed
add logo
1 parent ec3e859 commit bd58d24

File tree

4 files changed

+272
-0
lines changed

4 files changed

+272
-0
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# default behavior is to always use unix style line endings
2+
* text eol=lf
3+
*.png binary
4+
*.pdn binary
5+
*.sln binary
6+
*.suo binary
7+
*.vcproj binary
8+
*.patch binary

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ide/vs2017/*.db
2+
ide/vs2017/*.opendb
3+
ide/vs2017/*.user
4+
ide/vs2017/.vs
5+
out/
6+
bench/doc/
7+
bench/ebizzy/
8+
bench/malloc-test/
9+
bench/shbench/sh6bench.c
10+
bench/shbench/sh6bench-new.c
11+
bench/shbench/SH8BENCH.C
12+
bench/shbench/sh8bench-new.c
13+
*.zip

build-bench-env.sh

+251
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
procs=24
2+
curdir=`pwd`
3+
cd ..
4+
devdir=`pwd`
5+
cd $curdir
6+
7+
if test -f ./build-bench-env.sh; then
8+
echo "start; building with $procs concurrency under: $devdir"
9+
else
10+
echo "error: must run from the toplevel mimalloc-bench directory!"
11+
exit 1
12+
fi
13+
14+
function phase {
15+
cd "$curdir"
16+
echo
17+
echo
18+
echo "--------------------------------------------"
19+
echo $1
20+
echo "--------------------------------------------"
21+
echo
22+
}
23+
24+
phase "install packages"
25+
26+
echo "updating package database... (sudo apt update)"
27+
sudo apt update
28+
29+
function aptinstall {
30+
echo ""
31+
echo "> sudo apt install $1"
32+
echo ""
33+
sudo apt install $1
34+
}
35+
36+
aptinstall "g++ clang unzip dos2unix linuxinfo bc"
37+
aptinstall "cmake python ninja-build autoconf"
38+
aptinstall "libgoogle-perftools-dev libjemalloc-dev libgmp-dev libtbb-dev"
39+
40+
41+
phase "patch shbench"
42+
43+
pushd "bench/shbench"
44+
if test -f sh6bench-new.c; then
45+
echo "do nothing: bench/shbench/sh6bench-new.c already exists"
46+
else
47+
wget http://www.microquill.com/smartheap/shbench/bench.zip
48+
unzip -o bench.zip
49+
dos2unix sh6bench.patch
50+
dos2unix sh6bench.c
51+
patch -p1 -o sh6bench-new.c sh6bench.c sh6bench.patch
52+
fi
53+
if test -f sh8bench-new.c; then
54+
echo "do nothing: bench/shbench/sh8bench-new.c already exists"
55+
else
56+
wget http://www.microquill.com/smartheap/SH8BENCH.zip
57+
unzip -o SH8BENCH.zip
58+
dos2unix sh8bench.patch
59+
dos2unix SH8BENCH.C
60+
patch -p1 -o sh8bench-new.c SH8BENCH.C sh8bench.patch
61+
fi
62+
popd
63+
64+
phase "get Intel PDF manual"
65+
66+
pdfdoc="325462-sdm-vol-1-2abcd-3abcd.pdf"
67+
pushd "$devdir"
68+
if test -f "$pdfdoc"; then
69+
echo "do nothing: $devdir/$pdfdoc already exists"
70+
else
71+
wget https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf
72+
fi
73+
popd
74+
75+
phase "build hoard 3.13"
76+
77+
pushd $devdir
78+
if test -d Hoard; then
79+
echo "$devdir/Hoard already exists; no need to git clone"
80+
else
81+
git clone https://github.com/emeryberger/Hoard.git
82+
fi
83+
cd Hoard
84+
git checkout 3.13
85+
cd src
86+
make
87+
sudo make install
88+
popd
89+
90+
91+
phase "build jemalloc 5.2.0"
92+
93+
pushd $devdir
94+
if test -d jemalloc; then
95+
echo "$devdir/jemalloc already exists; no need to git clone"
96+
else
97+
git clone https://github.com/jemalloc/jemalloc.git
98+
fi
99+
cd jemalloc
100+
if test -f config.status; then
101+
echo "$devdir/jemalloc is already configured; no need to reconfigure"
102+
else
103+
git checkout 5.2.0
104+
./autogen.sh
105+
fi
106+
make -j $procs
107+
popd
108+
109+
phase "build rpmalloc 1.3.1"
110+
111+
pushd $devdir
112+
if test -d rpmalloc; then
113+
echo "$devdir/rpmalloc already exists; no need to git clone"
114+
else
115+
git clone https://github.com/rampantpixels/rpmalloc.git
116+
fi
117+
cd rpmalloc
118+
if test -f build.ninja; then
119+
echo "$devdir/rpmalloc is already configured; no need to reconfigure"
120+
else
121+
git checkout 1.3.1
122+
python configure.py
123+
fi
124+
ninja
125+
popd
126+
127+
phase "build snmalloc, commit 0b64536b"
128+
129+
pushd $devdir
130+
if test -d snmalloc; then
131+
echo "$devdir/snmalloc already exists; no need to git clone"
132+
else
133+
git clone https://github.com/Microsoft/snmalloc.git
134+
fi
135+
cd snmalloc
136+
if test -f release/build.ninja; then
137+
echo "$devdir/snmalloc is already configured; no need to reconfigure"
138+
else
139+
git checkout 0b64536b
140+
mkdir -p release
141+
cd release
142+
env CXX=clang++ cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release
143+
cd ..
144+
fi
145+
cd release
146+
ninja
147+
popd
148+
149+
150+
phase "build SuperMalloc (commit 709663fb)"
151+
152+
pushd $devdir
153+
if test -d SuperMalloc; then
154+
echo "$devdir/SuperMalloc already exists; no need to git clone"
155+
else
156+
git clone https://github.com/kuszmaul/SuperMalloc.git
157+
fi
158+
cd SuperMalloc
159+
git checkout 709663fb
160+
cd release
161+
make
162+
popd
163+
164+
165+
phase "build lean v3.4.1"
166+
167+
pushd $devdir
168+
if test -d lean; then
169+
echo "$devdir/lean already exists; no need to git clone"
170+
else
171+
git clone https://github.com/leanprover/lean
172+
fi
173+
cd lean
174+
git checkout v3.4.1
175+
mkdir -p out/release
176+
cd out/release
177+
env CC=gcc CXX=g++ cmake ../../src -DCUSTOM_ALLOCATORS=OFF
178+
make -j $procs
179+
popd
180+
181+
phase "build redis 5.0.3"
182+
183+
pushd "$devdir"
184+
if test -d "redis-5.0.3"; then
185+
echo "$devdir/redis-5.0.3 already exists; no need to download it"
186+
else
187+
wget "http://download.redis.io/releases/redis-5.0.3.tar.gz"
188+
tar xzf "redis-5.0.3.tar.gz"
189+
fi
190+
191+
cd "redis-5.0.3/src"
192+
make USE_JEMALLOC=no MALLOC=libc
193+
194+
popd
195+
196+
phase "build mimalloc variants"
197+
198+
pushd "$devdir"
199+
if test -d "mimalloc"; then
200+
echo "$devdir/mimalloc already exists; no need to download it"
201+
else
202+
git clone https://github.com/daanx/mimalloc
203+
fi
204+
cd mimalloc
205+
git checkout dev
206+
207+
echo ""
208+
echo "- build mimalloc release"
209+
210+
mkdir -p out/release
211+
cd out/release
212+
cmake ../..
213+
make
214+
cd ../..
215+
216+
echo ""
217+
echo "- build mimalloc debug"
218+
219+
mkdir -p out/debug
220+
cd out/debug
221+
cmake ../..
222+
make
223+
cd ../..
224+
225+
echo ""
226+
echo "- build mimalloc secure"
227+
228+
mkdir -p out/secure
229+
cd out/secure
230+
cmake ../..
231+
make
232+
cd ../..
233+
234+
phase "build benchmarks"
235+
236+
mkdir -p out/bench
237+
cd out/bench
238+
cmake ../../bench
239+
make
240+
cd ../..
241+
242+
curdir=`pwd`
243+
phase "done in $curdir"
244+
245+
echo "run the cfrac benchmarks as:"
246+
echo "> cd out/bench"
247+
echo "> ../../bench/bench.sh alla cfrac"
248+
echo
249+
echo "to see all options use:"
250+
echo "> ../../bench/bench.sh help"
251+
echo

doc/mimalloc-logo.png

71.4 KB
Loading

0 commit comments

Comments
 (0)