aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/hoard.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/hoard.py
parente9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff)
parent3f43d0f464b8da5829ff652a3208720c74d1882b (diff)
downloadallocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz
allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/hoard.py')
-rw-r--r--src/allocators/hoard.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/allocators/hoard.py b/src/allocators/hoard.py
index cc2061a..7e94d79 100644
--- a/src/allocators/hoard.py
+++ b/src/allocators/hoard.py
@@ -17,26 +17,23 @@
"""Hoard allocator definition for allocbench"""
-from src.allocator import Allocator, AllocatorSources
-
-
-sources = AllocatorSources("Hoard",
- retrieve_cmds=["git clone https://github.com/emeryberger/Hoard.git"],
- reset_cmds=["git reset --hard"])
+from src.allocator import Allocator
+from src.artifact import GitArtifact
class Hoard(Allocator):
"""Hoard allocator"""
- def __init__(self, name, **kwargs):
- kwargs["sources"] = sources
- kwargs["LD_PRELOAD"] = "{dir}/libhoard.so"
- kwargs["build_cmds"] = ["cd {srcdir}/src; make",
- "mkdir -p {dir}",
- "ln -f -s {srcdir}/src/libhoard.so {dir}/libhoard.so"]
- kwargs["requirements"] = ["clang"]
+ sources = GitArtifact("Hoard", "https://github.com/emeryberger/Hoard.git")
+
+ def __init__(self, name, **kwargs):
+ self.LD_PRELOAD = "{dir}/libhoard.so"
+ self.build_cmds = ["cd {srcdir}/src; make",
+ "mkdir -p {dir}",
+ "ln -f -s {srcdir}/src/libhoard.so {dir}/libhoard.so"]
+ self.requirements = ["clang"]
super().__init__(name, **kwargs)
-hoard = Hoard("Hoard", color="xkcd:brown")
+hoard = Hoard("Hoard", version="aa6d31700d5368a9f5ede3d62731247c8d9f0ebb", color="xkcd:brown")