blob: 24338e3a58911ba79feaba547e6fc13c43a2759e (
plain)
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
|
import src.allocator
version = "master"
mimalloc_src = src.allocator.Allocator_Sources("mimalloc",
["git clone https://github.com/microsoft/mimalloc"],
["git checkout ".format(version)],
["git reset --hard"])
class Mimalloc (src.allocator.Allocator):
"""mimalloc definition for allocbench"""
def __init__(self, name, **kwargs):
kwargs["sources"] = mimalloc_src
kwargs["LD_PRELOAD"] = "{dir}/libmimalloc.so"
kwargs["build_cmds"] = ["mkdir -p {dir}",
"cd {dir}; cmake {srcdir}",
"cd {dir}; make"]
kwargs["requirements"] = ["cmake"]
super().__init__(name, **kwargs)
mimalloc = Mimalloc("mimalloc")
|