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/scalloc.py | |
| parent | e9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff) | |
| parent | 3f43d0f464b8da5829ff652a3208720c74d1882b (diff) | |
| download | allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip | |
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/scalloc.py')
| -rw-r--r-- | src/allocators/scalloc.py | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/allocators/scalloc.py b/src/allocators/scalloc.py index 0b3d3cf..82ef8d1 100644 --- a/src/allocators/scalloc.py +++ b/src/allocators/scalloc.py @@ -17,32 +17,25 @@ """Scalloc definition for allocbench""" -from src.allocator import Allocator, AllocatorSources -from src.util import print_error - - -VERSION = "v1.0.0" - -SCALLOC_SRC = AllocatorSources("scalloc", - retrieve_cmds=["git clone https://github.com/cksystemsgroup/scalloc"], - prepare_cmds=[f"git checkout {VERSION}", - "cd {srcdir}; tools/make_deps.sh", - "cd {srcdir}; build/gyp/gyp --depth=. scalloc.gyp"], - reset_cmds=["git reset --hard"]) +from src.allocator import Allocator +from src.artifact import GitArtifact class Scalloc(Allocator): """Scalloc allocator""" - def __init__(self, name, **kwargs): - kwargs["sources"] = SCALLOC_SRC + sources = GitArtifact("scalloc", "https://github.com/cksystemsgroup/scalloc") + + def __init__(self, name, **kwargs): + self.prepare_cmds = ["tools/make_deps.sh", + "build/gyp/gyp --depth=. scalloc.gyp"] - kwargs["build_cmds"] = ["cd {srcdir}; BUILDTYPE=Release make", - "mkdir -p {dir}"] + self.build_cmds = ["cd {srcdir}; BUILDTYPE=Release make", + "mkdir -p {dir}"] - kwargs["LD_PRELOAD"] = "{srcdir}/out/Release/lib.target/libscalloc.so" + self.LD_PRELOAD = "{srcdir}/out/Release/lib.target/libscalloc.so" - kwargs["patches"] = ["{patchdir}/scalloc_fix_log.patch"] + self.patches = ["{patchdir}/scalloc_fix_log.patch"] super().__init__(name, **kwargs) @@ -57,4 +50,4 @@ sysctl vm.overcommit_memory=1 return super().build() -scalloc = Scalloc("scalloc", color="xkcd:magenta") +scalloc = Scalloc("scalloc", color="xkcd:magenta", version="v1.0.0") |
