pitrou commented on pull request #10240: URL: https://github.com/apache/arrow/pull/10240#issuecomment-838076933
Unfortunately, jemalloc configuration seems a bit [complicated](http://jemalloc.net/jemalloc.3.html). Some values are "read-only" in that you can only initialize them at process startup using a `const char*`. The `je_arrow_malloc_conf` serves that purpose; we cannot initialize those values later by reading an environment variable. > The string specified via --with-malloc-conf, the string pointed to by the global variable malloc_conf, the “name” of the file referenced by the symbolic link named /etc/malloc.conf, and the value of the environment variable MALLOC_CONF, will be interpreted, in that order, from left to right as options. Note that malloc_conf may be read before main() is entered, so the declaration of malloc_conf should specify an initializer that contains the final value to be read by jemalloc. --with-malloc-conf and malloc_conf are compile-time mechanisms, whereas /etc/malloc.conf and MALLOC_CONF can be safely set any time prior to program invocation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org