diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-21 18:38:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-21 18:38:25 +0200 |
| commit | 213e5625a9aa677230f261fcee01086f9ee1f850 (patch) | |
| tree | 21a422f2152f0f1921b431199acb69cc7568e07b /src/allocators/supermalloc.py | |
| parent | 84eec0baba49bff0a5c2b64834bc2d75d687e7b5 (diff) | |
| download | allocbench-213e5625a9aa677230f261fcee01086f9ee1f850.tar.gz allocbench-213e5625a9aa677230f261fcee01086f9ee1f850.zip | |
replace AllocatorSources with Artifacts
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") |
