aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/llalloc.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-09-29 15:35:02 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-09-29 15:35:02 +0200
commit059d263a6b944c4cfc5a5a0f2716e6a85116cfc1 (patch)
tree8169cefa09e08dab87f2f94967dc5a80ee2b425a /src/allocators/llalloc.py
parente9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff)
parent3f43d0f464b8da5829ff652a3208720c74d1882b (diff)
downloadallocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz
allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/llalloc.py')
-rw-r--r--src/allocators/llalloc.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/allocators/llalloc.py b/src/allocators/llalloc.py
index b0da505..8f43f59 100644
--- a/src/allocators/llalloc.py
+++ b/src/allocators/llalloc.py
@@ -17,25 +17,24 @@
"""Lockless allocator definition for allocbench"""
-from src.allocator import Allocator, AllocatorSources
-
-
-LLALLOC_SOURCE = AllocatorSources("lockless_allocator",
- retrieve_cmds=["wget https://locklessinc.com/downloads/lockless_allocator_src.tgz",
- "tar xf lockless_allocator_src.tgz"],
- prepare_cmds=[],
- reset_cmds=[])
+from src.allocator import Allocator
+from src.artifact import ArchiveArtifact
class LocklessAllocator(Allocator):
"""Lockless allocator"""
def __init__(self, name, **kwargs):
- kwargs["sources"] = LLALLOC_SOURCE
+ self.sources = ArchiveArtifact("llalloc",
+ "https://locklessinc.com/downloads/lockless_allocator_src.tgz",
+ "tar",
+ "c6cb5a57882fa4775b5227a322333a6126b61f7c")
- kwargs["build_cmds"] = ["cd {srcdir}; make", "mkdir -p {dir}"]
+ self.build_cmds = ["cd {srcdir}/lockless_allocator; make",
+ "mkdir -p {dir}",
+ "ln -f -s {srcdir}/lockless_allocator/libllalloc.so.1.3 {dir}/libllalloc.so"]
- kwargs["LD_PRELOAD"] = "{srcdir}/libllalloc.so.1.3"
+ self.LD_PRELOAD = "{dir}/libllalloc.so"
super().__init__(name, **kwargs)