aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/snmalloc.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/snmalloc.py
parente9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff)
parent3f43d0f464b8da5829ff652a3208720c74d1882b (diff)
downloadallocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz
allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/snmalloc.py')
-rw-r--r--src/allocators/snmalloc.py27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/allocators/snmalloc.py b/src/allocators/snmalloc.py
index 0496196..7f27e4b 100644
--- a/src/allocators/snmalloc.py
+++ b/src/allocators/snmalloc.py
@@ -17,28 +17,23 @@
"""Snmalloc definition for allocbench"""
-from src.allocator import Allocator, AllocatorSources
-
-VERSION = "master"
-
-SNMALLOC_SRC = AllocatorSources("snmalloc",
- ["git clone https://github.com/microsoft/snmalloc"],
- [f"git checkout {VERSION}"],
- ["git reset --hard"])
+from src.allocator import Allocator
+from src.artifact import GitArtifact
class Snmalloc(Allocator):
"""snmalloc allocator"""
- def __init__(self, name, **kwargs):
- kwargs["sources"] = SNMALLOC_SRC
- kwargs["LD_PRELOAD"] = "{dir}/libsnmallocshim.so"
- kwargs["build_cmds"] = ["mkdir -p {dir}",
- "cd {dir}; cmake -G Ninja {srcdir} -DCMAKE_BUILD_TYPE=Release",
- "cd {dir}; ninja"]
- kwargs["requirements"] = ["cmake", "ninja", "clang"]
+ sources = GitArtifact("snmalloc", "https://github.com/microsoft/snmalloc")
+
+ def __init__(self, name, **kwargs):
+ self.LD_PRELOAD = "{dir}/libsnmallocshim.so"
+ self.build_cmds = ["mkdir -p {dir}",
+ "cd {dir}; cmake -G Ninja {srcdir} -DCMAKE_BUILD_TYPE=Release",
+ "cd {dir}; ninja"]
+ self.requirements = ["cmake", "ninja", "clang"]
super().__init__(name, **kwargs)
-snmalloc = Snmalloc("snmalloc")
+snmalloc = Snmalloc("snmalloc", version="0.2")