Use jemalloc for Rust

This commit is contained in:
Erik Johnston
2026-01-29 13:03:25 +00:00
parent d02796fcc4
commit 773b78f4ae
3 changed files with 28 additions and 0 deletions
Generated
+21
View File
@@ -1339,6 +1339,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
"tikv-jemallocator",
"tokio",
"ulid",
]
@@ -1389,6 +1390,26 @@ dependencies = [
"syn",
]
[[package]]
name = "tikv-jemalloc-sys"
version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "tikv-jemallocator"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a"
dependencies = [
"libc",
"tikv-jemalloc-sys",
]
[[package]]
name = "tinystr"
version = "0.8.1"
+4
View File
@@ -53,6 +53,10 @@ http-body-util = "0.1.3"
futures = "0.3.31"
tokio = { version = "1.44.2", features = ["rt", "rt-multi-thread"] }
once_cell = "1.18.0"
tikv-jemallocator = { version = "0.6", features = [
"unprefixed_malloc_on_supported_platforms",
"disable_initial_exec_tls",
] }
[features]
extension-module = ["pyo3/extension-module"]
+3
View File
@@ -16,6 +16,9 @@ pub mod push;
pub mod rendezvous;
pub mod segmenter;
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
lazy_static! {
static ref LOGGING_HANDLE: ResetHandle = pyo3_log::init();
}