1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-09-09 17:10:57 +00:00

start mallctl suite w/ jemalloc stats

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-27 04:50:20 -07:00 committed by June
parent 56f652c12d
commit e4b669360f
9 changed files with 101 additions and 14 deletions

View file

@ -49,6 +49,7 @@ use utils::{
error::{Error, Result},
};
mod alloc;
mod api;
mod config;
mod database;
@ -66,14 +67,6 @@ pub(crate) fn services() -> &'static Services<'static> {
.expect("SERVICES should be initialized when this is called")
}
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc", not(feature = "hardened_malloc")))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", target_os = "linux", not(feature = "jemalloc")))]
#[global_allocator]
static GLOBAL: hardened_malloc_rs::HardenedMalloc = hardened_malloc_rs::HardenedMalloc;
struct Server {
config: Config,