feat(rustfs/main): use jemalloc

This commit is contained in:
Nugine
2025-04-03 14:40:42 +08:00
parent fffa1ec671
commit 69598b48e3
3 changed files with 28 additions and 0 deletions
+3
View File
@@ -81,6 +81,9 @@ uuid = { workspace = true }
[target.'cfg(target_os = "linux")'.dependencies]
libsystemd.workspace = true
[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies]
tikv-jemallocator = "0.6"
[build-dependencies]
prost-build.workspace = true
tonic-build.workspace = true
+4
View File
@@ -54,6 +54,10 @@ use tonic::{metadata::MetadataValue, Request, Status};
use tower_http::cors::CorsLayer;
use tracing::{debug, error, info, info_span, warn};
#[cfg(all(target_os = "linux", target_env = "gnu"))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
fn check_auth(req: Request<()>) -> Result<Request<()>, Status> {
let token: MetadataValue<_> = "rustfs rpc".parse().unwrap();