Disable config from file or envvar with build flag

This adds a new autoconf flag, --disable-user-config, which disables
reading the configuration from /etc/malloc.conf or the MALLOC_CONF
environment variable. This can be useful when integrating jemalloc in a
binary that internally handles all aspects of the configuration and
shouldn't be impacted by ambient change in the environment.
This commit is contained in:
roblabla 2024-07-30 14:56:42 +02:00 committed by Qi Wang
parent 34c823f147
commit c17bf8b368
3 changed files with 49 additions and 15 deletions

View file

@ -46,6 +46,12 @@
*/
#undef JEMALLOC_USE_CXX_THROW
/*
* If undefined, disables reading configuration from environment variable or file
*/
#undef JEMALLOC_CONFIG_ENV
#undef JEMALLOC_CONFIG_FILE
#ifdef _MSC_VER
# ifdef _WIN64
# define LG_SIZEOF_PTR_WIN 3