From 0d192f8cf3c21b2382e227fab057dabe16ea5e8b Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 17 Jun 2019 14:54:26 +0200 Subject: reduce code duplication by giving each known allocator its own class also move allocator related code to src/allocators --- src/allocators/hoard.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/allocators/hoard.py (limited to 'src/allocators/hoard.py') 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) -- cgit v1.2.3