refactor: move jemalloc setup to memory crate

This commit is contained in:
Wez Furlong
2023-07-20 13:18:38 -07:00
parent f08e674b5f
commit 78736f779b
4 changed files with 4 additions and 8 deletions
Generated
-2
View File
@@ -2351,8 +2351,6 @@ dependencies = [
"spool",
"thiserror",
"throttle",
"tikv-jemalloc-sys",
"tikv-jemallocator",
"timeq",
"tokio",
"tokio-rustls 0.23.4",
+4
View File
@@ -11,8 +11,12 @@ use nix::unistd::{sysconf, SysconfVar};
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::Mutex;
use std::time::Duration;
use tikv_jemallocator::Jemalloc;
use tokio::sync::watch::Receiver;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
lazy_static::lazy_static! {
static ref OVER_LIMIT_COUNT: metrics::Counter = {
metrics::describe_counter!(
-2
View File
@@ -31,8 +31,6 @@ gcd = "2.3"
gethostname = "0.4"
humansize = "2.1" # for printing
json_comments = "0.2"
tikv-jemallocator = "0.5"
tikv-jemalloc-sys = {version="0.5", features=["profiling", "unprefixed_malloc_on_supported_platforms"]}
kumo-api-types = {path="../kumo-api-types"}
kumo-log-types = {path="../kumo-log-types"}
kumo-server-common = {path="../kumo-server-common"}
-4
View File
@@ -9,7 +9,6 @@ use nix::sys::signal::{kill, SIGQUIT};
use nix::unistd::{Pid, Uid, User};
use once_cell::sync::OnceCell;
use std::path::PathBuf;
use tikv_jemallocator::Jemalloc;
use tracing_subscriber::fmt::writer::BoxMakeWriter;
use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, EnvFilter, Layer};
@@ -33,9 +32,6 @@ static TRACING_FILTER_RELOAD_HANDLE: OnceCell<
Box<dyn Fn(&str) -> anyhow::Result<()> + Send + Sync>,
> = OnceCell::new();
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
mod delivery_metrics;
mod egress_path;
mod egress_source;