mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
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/
17 lines
447 B
TOML
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"]
|