-
Notifications
You must be signed in to change notification settings - Fork 27
/
install_mimalloc.sh
45 lines (40 loc) · 924 Bytes
/
install_mimalloc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash -x
mkdir -p lib
cd lib
if [ $? -ne 0 ]
then
echo "lib directory not found"
exit
fi
cd mimalloc
if [ $? -ne 0 ]
then
echo "lib/mimalloc directory not found"
git clone -b v1.6.0 https://github.com/microsoft/mimalloc.git
if [ $? -ne 0 ]
then
echo "Unable to perform git clone https://github.com/microsoft/mimalloc.git"
exit
fi
cd mimalloc
fi
echo "CMake is required for installing mimalloc"
unset LD_PRELOAD
mkdir -p out/release
cd out/release
if [ $? -ne 0 ]
then
echo "out/release directory not found"
exit
fi
cmake ../..
if [ $? -ne 0 ]
then
echo "cmake not found"
exit
fi
make
echo "################################################################################"
echo "Mimalloc installed."
echo "Ensure that you export LD_PRELOAD=`pwd`/libmimalloc.so"
echo "################################################################################"