diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-29 15:35:02 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-29 15:35:02 +0200 |
| commit | 059d263a6b944c4cfc5a5a0f2716e6a85116cfc1 (patch) | |
| tree | 8169cefa09e08dab87f2f94967dc5a80ee2b425a /src/allocators/supermalloc.py | |
| parent | e9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff) | |
| parent | 3f43d0f464b8da5829ff652a3208720c74d1882b (diff) | |
| download | allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip | |
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/supermalloc.py')
| -rw-r--r-- | src/allocators/supermalloc.py | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/allocators/supermalloc.py b/src/allocators/supermalloc.py index 130dd47..f0a192a 100644 --- a/src/allocators/supermalloc.py +++ b/src/allocators/supermalloc.py @@ -17,29 +17,23 @@ """SuperMalloc definition for allocbench""" -from src.allocator import Allocator, AllocatorSources - -import src.allocator - -VERSION = "709663fb81ba091b0a78058869a644a272f4163d" - -sources = AllocatorSources("SuperMalloc", - retrieve_cmds=["git clone https://github.com/kuszmaul/SuperMalloc"], - prepare_cmds=[f"git checkout {VERSION}"], - reset_cmds=["git reset --hard"]) - +from src.allocator import Allocator +from src.artifact import GitArtifact class SuperMalloc(Allocator): """SuperMalloc allocator""" - def __init__(self, name, **kwargs): - kwargs["sources"] = sources - kwargs["LD_PRELOAD"] = "{srcdir}/release/lib/libsupermalloc.so" - kwargs["build_cmds"] = ["cd {srcdir}/release; make", - "mkdir -p {dir}"] - kwargs["patches"] = ["{patchdir}/remove_faulty_aligned_alloc_test.patch"] + sources = GitArtifact("SuperMalloc", "https://github.com/kuszmaul/SuperMalloc") + + def __init__(self, name, **kwargs): + self.LD_PRELOAD = "{dir}/libsupermalloc.so" + self.build_cmds = ["cd {srcdir}/release; make", + "mkdir -p {dir}", + "ln -f -s {srcdir}/release/lib/libsupermalloc.so {dir}/libsupermalloc.so"] + self.patches = ["{patchdir}/remove_faulty_aligned_alloc_test.patch"] super().__init__(name, **kwargs) -supermalloc = SuperMalloc("SuperMalloc", color="xkcd:lime") +supermalloc = SuperMalloc("SuperMalloc", color="xkcd:lime", + version="709663fb81ba091b0a78058869a644a272f4163d") |
