MinedMap/crates/default-alloc/Cargo.toml
Matthias Schiffer 1d9be9a41c
Add jemalloc and jemalloc-auto features
Introduce the new features jemalloc (set jemalloc global allocator
unconditionally) and jemalloc-auto (set jemalloc global allocator on
musl-based targets to fix multithreaded performance, see [1]).

Because cargo does not support target-specific features or feature
defaults, the default is handled using a helper crate
minedmap-default-alloc.

[1] https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance/
2025-02-12 20:34:09 +01:00

17 lines
447 B
TOML

[package]
name = "minedmap-default-alloc"
version = "0.1.0"
description = "Helper crate for target-specific selection of global allocator default"
edition.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
[dependencies]
tikv-jemallocator = { version = "0.6.0", optional = true }
[target.'cfg(target_env = "musl")'.dependencies]
tikv-jemallocator = "*"
[features]
jemalloc = ["dep:tikv-jemallocator"]