aboutsummaryrefslogtreecommitdiff
path: root/src/allocators.py
diff options
context:
space:
mode:
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