aboutsummaryrefslogtreecommitdiff
path: root/src/allocators
diff options
context:
space:
mode:
Diffstat (limited to 'src/allocators')
-rw-r--r--src/allocators/all.py4
-rw-r--r--src/allocators/llalloc.py21
2 files changed, 12 insertions, 13 deletions
diff --git a/src/allocators/all.py b/src/allocators/all.py
index a2b502a..0593c81 100644
--- a/src/allocators/all.py
+++ b/src/allocators/all.py
@@ -24,12 +24,12 @@ from src.allocators.hoard import hoard
from src.allocators.mesh import mesh
from src.allocators.scalloc import scalloc
from src.allocators.supermalloc import supermalloc
-# from src.allocators.llalloc import llalloc
+from src.allocators.llalloc import llalloc
from src.allocators.tbbmalloc import tbbmalloc
from src.allocators.mimalloc import mimalloc
from src.allocators.snmalloc import snmalloc
allocators = [*src.allocators.glibcs.allocators, tcmalloc, tcmalloc_nofs,
- jemalloc, hoard, mesh, supermalloc, scalloc, tbbmalloc, # llalloc, # streamflow,
+ jemalloc, hoard, mesh, supermalloc, scalloc, tbbmalloc, llalloc, # streamflow,
mimalloc, snmalloc]
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)