diff --git a/buildconf/default.ini b/buildconf/default.ini index 7ecd711f..44bc5249 100644 --- a/buildconf/default.ini +++ b/buildconf/default.ini @@ -22,7 +22,7 @@ debug = false unbit = false xml_implementation = libxml2 yaml_implementation = auto -tcmalloc = false +malloc_implementation = libc plugins = bin_name = uwsgi plugin_dir = . diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 6fa68470..4318ca1e 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -350,8 +350,11 @@ class uConf(object): self.cflags.append('-DUWSGI_EVENT_FILEMONITOR_USE_NONE') - if self.get('tcmalloc'): - self.libs.append('-ltcmalloc') + if self.get('malloc_implementation') != 'libc': + if self.get('malloc_implementation') == 'tcmalloc': + self.libs.append('-ltcmalloc') + if self.get('malloc_implementation') == 'jemalloc': + self.libs.append('-ljemalloc') if self.get('embedded'): self.cflags.append('-DUWSGI_EMBEDDED')