aboutsummaryrefslogtreecommitdiff
path: root/src/allocators.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-03-06 13:20:52 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-03-06 13:20:52 +0100
commit0623a281998ee1d7a62c3f904f76888446cb237a (patch)
treedee8d03233c2d867106e9d4a346ca12742afc8c8 /src/allocators.py
parent6027198427d77ae48932104eed2615968ae74616 (diff)
downloadallocbench-0623a281998ee1d7a62c3f904f76888446cb237a.tar.gz
allocbench-0623a281998ee1d7a62c3f904f76888446cb237a.zip
add allocators to globalvars; kill mysql server on exit; save libc versions of requirements
Diffstat (limited to 'src/allocators.py')
-rw-r--r--src/allocators.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/allocators.py b/src/allocators.py
index 717c500..26fab5b 100644
--- a/src/allocators.py
+++ b/src/allocators.py
@@ -3,12 +3,14 @@
import os
import subprocess
+import src.globalvars
+
maybe_allocators = ["tcmalloc", "jemalloc", "hoard"]
-allocators = {"libc": {"cmd_prefix" : "",
- "binary_suffix" : "",
- "LD_PRELOAD" : "",
- "color" : "C1"}}
+src.globalvars.allocators = {"libc": {"cmd_prefix" : "",
+ "binary_suffix" : "",
+ "LD_PRELOAD" : "",
+ "color" : "C1"}}
for i, t in enumerate(maybe_allocators):
try:
@@ -17,7 +19,9 @@ for i, t in enumerate(maybe_allocators):
universal_newlines=True).stdout.strip()
if path != "":
- allocators[t] = {"cmd_prefix": "", "binary_suffix": "",
- "LD_PRELOAD": path, "color": "C"+str(i+2)}
+ src.globalvars.allocators[t] = {"cmd_prefix": "",
+ "binary_suffix": "",
+ "LD_PRELOAD": path,
+ "color": "C"+str(i+2)}
except:
pass