aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/je_tc_super.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-06-17 14:54:26 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-06-17 14:54:26 +0200
commit0d192f8cf3c21b2382e227fab057dabe16ea5e8b (patch)
treed1182f33bd69e72fdde0a4731287f28c318ef109 /src/allocators/je_tc_super.py
parent3988f2e21754208a548725c590fb42e372a32efa (diff)
downloadallocbench-0d192f8cf3c21b2382e227fab057dabe16ea5e8b.tar.gz
allocbench-0d192f8cf3c21b2382e227fab057dabe16ea5e8b.zip
reduce code duplication by giving each known allocator its own class
also move allocator related code to src/allocators
Diffstat (limited to 'src/allocators/je_tc_super.py')
-rw-r--r--src/allocators/je_tc_super.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/allocators/je_tc_super.py b/src/allocators/je_tc_super.py
new file mode 100644
index 0000000..2315da3
--- /dev/null
+++ b/src/allocators/je_tc_super.py
@@ -0,0 +1,19 @@
+from src.allocator import Allocator as Alloc
+from src.allocator import Allocator_Sources as Alloc_Src
+
+from src.allocators.glibc import Glibc
+from src.allocators.tcmalloc import TCMalloc
+from src.allocators.jemalloc import Jemalloc
+from src.allocators.supermalloc import SuperMalloc
+
+glibc = Glibc("glibc", color="C1")
+
+tcmalloc = TCMalloc("tcmalloc", color="C5")
+
+jemalloc = Jemalloc("jemalloc", color="C6")
+
+supermalloc = SuperMalloc("SuperMalloc", color="C8")
+
+allocators_to_build = [glibc, tcmalloc, jemalloc, supermalloc]
+
+allocators = {a.name: a.build() for a in allocators_to_build}