diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-27 14:56:54 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-27 14:56:54 +0200 |
| commit | 589f45bd6e4058658ed0c86b7387802ee0be37d8 (patch) | |
| tree | 3498da771f9b3dadd66333bb96a0958916256e81 /src/allocators/mimalloc.py | |
| parent | 5de25aaac2358494469605ace1685307d294bdbf (diff) | |
| download | allocbench-589f45bd6e4058658ed0c86b7387802ee0be37d8.tar.gz allocbench-589f45bd6e4058658ed0c86b7387802ee0be37d8.zip | |
add mimalloc definition
Diffstat (limited to 'src/allocators/mimalloc.py')
| -rw-r--r-- | src/allocators/mimalloc.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/allocators/mimalloc.py b/src/allocators/mimalloc.py new file mode 100644 index 0000000..b636a04 --- /dev/null +++ b/src/allocators/mimalloc.py @@ -0,0 +1,24 @@ +import src.allocator + +version = "master" + +mimalloc_src = src.allocator.Allocator_Sources("mimalloc", + ["git clone https://github.com/microsoft/mimalloc"], + ["git checkout ".format(version)], + ["git stash"]) + + +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"] = ["cd {srcdir}; mkdir -p {dir}", + "cd {dir}; cmake {srcdir}", + "cd {dir}; make"] + + super().__init__(name, **kwargs) + + +mimalloc = Mimalloc("mimalloc") |
