diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-21 17:57:11 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-08-21 17:57:11 +0200 |
| commit | 084b3ce3c13fe03e509e38a48184d23d8d532dc4 (patch) | |
| tree | dedbd486153134906f5d3f5303c1b7e1c6b754f7 | |
| parent | 3ea7840d641ebae59a5ae2af2dc4c1cad370b4df (diff) | |
| download | allocbench-084b3ce3c13fe03e509e38a48184d23d8d532dc4.tar.gz allocbench-084b3ce3c13fe03e509e38a48184d23d8d532dc4.zip | |
add snmalloc definition
| -rw-r--r-- | src/allocators/snmalloc.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/allocators/snmalloc.py b/src/allocators/snmalloc.py new file mode 100644 index 0000000..0cc4dc7 --- /dev/null +++ b/src/allocators/snmalloc.py @@ -0,0 +1,25 @@ +import src.allocator + +version = "master" + +snmalloc_src = src.allocator.Allocator_Sources("snmalloc", + ["git clone https://github.com/microsoft/snmalloc"], + ["git checkout ".format(version)], + ["git reset --hard"]) + + +class Snmalloc (src.allocator.Allocator): + """snmalloc definition for allocbench""" + def __init__(self, name, **kwargs): + + kwargs["sources"] = snmalloc_src + kwargs["LD_PRELOAD"] = "{dir}/libsnmallocshim.so" + kwargs["build_cmds"] = ["mkdir -p {dir}", + "cd {dir}; cmake -G Ninja {srcdir} -DCMAKE_BUILD_TYPE=Release", + "cd {dir}; ninja"] + kwargs["requirements"] = ["cmake", "ninja", "clang"] + + super().__init__(name, **kwargs) + + +snmalloc = Snmalloc("snmalloc") |
