aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/mimalloc.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-09-29 15:35:02 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-09-29 15:35:02 +0200
commit059d263a6b944c4cfc5a5a0f2716e6a85116cfc1 (patch)
tree8169cefa09e08dab87f2f94967dc5a80ee2b425a /src/allocators/mimalloc.py
parente9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff)
parent3f43d0f464b8da5829ff652a3208720c74d1882b (diff)
downloadallocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz
allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/mimalloc.py')
-rw-r--r--src/allocators/mimalloc.py27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/allocators/mimalloc.py b/src/allocators/mimalloc.py
index 2f84fe1..6931217 100644
--- a/src/allocators/mimalloc.py
+++ b/src/allocators/mimalloc.py
@@ -17,28 +17,23 @@
"""mimalloc definition for allocbench"""
-from src.allocator import Allocator, AllocatorSources
-
-VERSION = "master"
-
-MIMALLOC_SRC = AllocatorSources("mimalloc",
- ["git clone https://github.com/microsoft/mimalloc"],
- [f"git checkout {VERSION}"],
- ["git reset --hard"])
+from src.allocator import Allocator
+from src.artifact import GitArtifact
class Mimalloc(Allocator):
"""mimalloc allocator"""
- 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"]
+ sources = GitArtifact("mimalloc", "https://github.com/microsoft/mimalloc")
+
+ def __init__(self, name, **kwargs):
+ self.LD_PRELOAD = "{dir}/libmimalloc.so"
+ self.build_cmds = ["mkdir -p {dir}",
+ "cd {dir}; cmake {srcdir}",
+ "cd {dir}; make"]
+ self.requirements = ["cmake"]
super().__init__(name, **kwargs)
-mimalloc = Mimalloc("mimalloc")
+mimalloc = Mimalloc("mimalloc", version="v1.0.8")