Use jemalloc

This commit is contained in:
Erik Johnston
2026-05-19 15:34:40 +01:00
parent c36c75ef3c
commit c8fbb004de
3 changed files with 15 additions and 26 deletions
Generated
+7 -24
View File
@@ -80,12 +80,6 @@ dependencies = [
"shlex",
]
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cfg-if"
version = "1.0.1"
@@ -295,7 +289,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
dependencies = [
"cfg-if 1.0.1",
"cfg-if",
"js-sys",
"libc",
"wasi 0.11.1+wasi-snapshot-preview1",
@@ -308,7 +302,7 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
dependencies = [
"cfg-if 1.0.1",
"cfg-if",
"js-sys",
"libc",
"r-efi",
@@ -1063,7 +1057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
dependencies = [
"cc",
"cfg-if 1.0.1",
"cfg-if",
"getrandom 0.2.16",
"libc",
"untrusted",
@@ -1243,7 +1237,7 @@ version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if 1.0.1",
"cfg-if",
"cpufeatures",
"digest",
]
@@ -1254,7 +1248,7 @@ version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if 1.0.1",
"cfg-if",
"cpufeatures",
"digest",
]
@@ -1349,7 +1343,6 @@ dependencies = [
"serde_json",
"sha2",
"tikv-jemallocator",
"tikv-jemallocator-global",
"tokio",
"ulid",
]
@@ -1420,16 +1413,6 @@ dependencies = [
"tikv-jemalloc-sys",
]
[[package]]
name = "tikv-jemallocator-global"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f51508a8b70f3a9778a8c2350d66e5fc1803b65893994db4ef633ae012d9f485"
dependencies = [
"cfg-if 0.1.10",
"tikv-jemallocator",
]
[[package]]
name = "tinystr"
version = "0.8.1"
@@ -1643,7 +1626,7 @@ version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if 1.0.1",
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
@@ -1669,7 +1652,7 @@ version = "0.4.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
dependencies = [
"cfg-if 1.0.1",
"cfg-if",
"js-sys",
"once_cell",
"wasm-bindgen",
+4 -2
View File
@@ -63,8 +63,10 @@ futures = "0.3.31"
tokio = { version = "1.44.2", features = ["rt", "rt-multi-thread"] }
once_cell = "1.18.0"
itertools = "0.14.0"
tikv-jemallocator = { version = "0.6.1", features = ["disable_initial_exec_tls", "unprefixed_malloc_on_supported_platforms"] }
tikv-jemallocator-global = "0.6.0"
tikv-jemallocator = { version = "0.6.1", features = [
"disable_initial_exec_tls",
"unprefixed_malloc_on_supported_platforms",
] }
[build-dependencies]
blake2 = "0.10.4"
+4
View File
@@ -3,6 +3,7 @@ use std::convert::Infallible;
use lazy_static::lazy_static;
use pyo3::prelude::*;
use pyo3_log::ResetHandle;
use tikv_jemallocator::Jemalloc;
pub mod acl;
pub mod canonical_json;
@@ -19,6 +20,9 @@ pub mod rendezvous;
pub mod room_versions;
pub mod segmenter;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
lazy_static! {
static ref LOGGING_HANDLE: ResetHandle = pyo3_log::init();
}