-
Notifications
You must be signed in to change notification settings - Fork 79
Make it easier to set static options #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can also set it up using environment variable |
In either case, how do you confirm that the settings are being used? |
Okay, I confirmed that it's reaching jemalloc by setting it to an invalid string and then getting Assuming you've already installed jemalloc at this point cargo clean -p jemalloc-sys
export JEMALLOC_SYS_WITH_MALLOC_CONF="background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,abort_conf:true"
cargo build |
Interesting. I think it should be a bug of jemalloc-sys's build script. It should hint cargo to watch the environment variable. |
I've managed to provide static options to jemalloc in my application via this code:
This isn't very nice, is quite unsafe though no
unsafe
is present, and is dependent on prefixing being disabled. It would be nice if the crate provided a way to set this string in a safe(r) way.The text was updated successfully, but these errors were encountered: