aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/tbbmalloc.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-06-24 19:26:10 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-06-24 19:26:10 +0200
commit7ffa9b4319363d1b424246e3a0ffc972d3158025 (patch)
tree5cca4b781bd941a62f5cc17522fdb88af0453b5b /src/allocators/tbbmalloc.py
parentaf9a1be4d59438bcb24cdd64572841563860b87a (diff)
downloadallocbench-7ffa9b4319363d1b424246e3a0ffc972d3158025.tar.gz
allocbench-7ffa9b4319363d1b424246e3a0ffc972d3158025.zip
add tbbmalloc definition
Diffstat (limited to 'src/allocators/tbbmalloc.py')
-rw-r--r--src/allocators/tbbmalloc.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/allocators/tbbmalloc.py b/src/allocators/tbbmalloc.py
new file mode 100644
index 0000000..420803b
--- /dev/null
+++ b/src/allocators/tbbmalloc.py
@@ -0,0 +1,24 @@
+import src.allocator
+
+version = "2019_U8"
+
+source = src.allocator.Allocator_Sources("tbb",
+ ["git clone https://github.com/intel/tbb.git"],
+ ["git checkout {}".format(version)],
+ ["git stash"])
+
+
+class TBBMalloc (src.allocator.Allocator):
+ """TCMalloc definition for allocbench"""
+ def __init__(self, name, **kwargs):
+
+ kwargs["sources"] = source
+ kwargs["LD_PRELOAD"] = "{dir}/libtbbmalloc.so"
+ kwargs["build_cmds"] = ["cd {srcdir}; make tbbmalloc -j4",
+ "mkdir -p {dir}",
+ 'ln -f -s $(find {srcdir} -executable -name "*libtbbmalloc.so*") {dir}/libtbbmalloc.so']
+
+ super().__init__(name, **kwargs)
+
+
+tbbmalloc = TBBMalloc("tbbmalloc")