aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/hoard.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-06-17 14:54:26 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-06-17 14:54:26 +0200
commit0d192f8cf3c21b2382e227fab057dabe16ea5e8b (patch)
treed1182f33bd69e72fdde0a4731287f28c318ef109 /src/allocators/hoard.py
parent3988f2e21754208a548725c590fb42e372a32efa (diff)
downloadallocbench-0d192f8cf3c21b2382e227fab057dabe16ea5e8b.tar.gz
allocbench-0d192f8cf3c21b2382e227fab057dabe16ea5e8b.zip
reduce code duplication by giving each known allocator its own class
also move allocator related code to src/allocators
Diffstat (limited to 'src/allocators/hoard.py')
-rw-r--r--src/allocators/hoard.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/allocators/hoard.py b/src/allocators/hoard.py
new file mode 100644
index 0000000..c50a616
--- /dev/null
+++ b/src/allocators/hoard.py
@@ -0,0 +1,18 @@
+import src.allocator
+
+
+version = 2.7
+sources = src.allocator.Allocator_Sources("Hoard",
+ retrieve_cmds=["git clone https://github.com/emeryberger/Hoard.git"],
+ reset_cmds=["git stash"])
+
+class Hoard (src.allocator.Allocator):
+ """Hoard definition for allocbench"""
+ def __init__(self, name, **kwargs):
+
+ kwargs["sources"] = sources
+ kwargs["LD_PRELOAD"] = "{srcdir}/src/libhoard.so"
+ kwargs["build_cmds"] = ["cd {srcdir}/src; make", "mkdir {dir}"]
+ kwargs["patches"] = ["{patchdir}/hoard_make.patch"]
+
+ super().__init__(name, **kwargs)