From ceeac9d3a495302b625d9a59f7d62e2cc35a306e Mon Sep 17 00:00:00 2001 From: Serge Farny Date: Wed, 27 Mar 2024 14:07:13 +0100 Subject: [PATCH] service-mango-health: use jemalloc (#922) --- bin/service-mango-health/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/service-mango-health/src/main.rs b/bin/service-mango-health/src/main.rs index 9b3b5174a..b536a0657 100644 --- a/bin/service-mango-health/src/main.rs +++ b/bin/service-mango-health/src/main.rs @@ -16,6 +16,11 @@ use crate::processors::health::HealthProcessor; use crate::processors::logger::LoggerProcessor; use crate::processors::persister::PersisterProcessor; +// jemalloc seems to be better at keeping the memory footprint reasonable over +// longer periods of time +#[global_allocator] +static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; + #[tokio::main] async fn main() -> anyhow::Result<()> { let args: Vec = std::env::args().collect();