From 0d192f8cf3c21b2382e227fab057dabe16ea5e8b Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 17 Jun 2019 14:54:26 +0200 Subject: reduce code duplication by giving each known allocator its own class also move allocator related code to src/allocators --- src/allocators/je_tc_super.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/allocators/je_tc_super.py (limited to 'src/allocators/je_tc_super.py') 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} -- cgit v1.2.3