diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-24 17:21:09 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-06-24 17:21:09 +0200 |
| commit | f20c5285a0c0351a4cb8ac68a994a8d69457963e (patch) | |
| tree | 3c14906e3982bcd22eded5ae144bfc5478b2889a /src/allocators/llalloc.py | |
| parent | 6dc6cea0b738c74852b920a9cf2fb1c49634dbe9 (diff) | |
| download | allocbench-f20c5285a0c0351a4cb8ac68a994a8d69457963e.tar.gz allocbench-f20c5285a0c0351a4cb8ac68a994a8d69457963e.zip | |
add mesh and lockless_allocator definitions
Diffstat (limited to 'src/allocators/llalloc.py')
| -rw-r--r-- | src/allocators/llalloc.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/allocators/llalloc.py b/src/allocators/llalloc.py new file mode 100644 index 0000000..073899c --- /dev/null +++ b/src/allocators/llalloc.py @@ -0,0 +1,25 @@ +from src.allocator import Allocator, Allocator_Sources, library_path + + +source = Allocator_Sources("lockless_allocator", + retrieve_cmds=["wget https://locklessinc.com/downloads/lockless_allocator_src.tgz", + "tar xf lockless_allocator_src.tgz"], + prepare_cmds=[], + reset_cmds=[]) + + +class Lockless_Allocator (Allocator): + """Lockless allocator definition for allocbench""" + def __init__(self, name, **kwargs): + + kwargs["sources"] = source + + kwargs["build_cmds"] = ["cd {srcdir}; make", "mkdir -p {dir}"] + + kwargs["LD_PRELOAD"] = "{srcdir}/libllalloc.so.1.3" + + super().__init__(name, **kwargs) + + +llalloc = Lockless_Allocator("llalloc") + |
