easytier-web and uptime use mimalloc as allocator (#1559)

This commit is contained in:
Sijie.Sun
2025-11-08 11:07:33 +08:00
committed by GitHub
parent 55b93454dc
commit b50744690e
6 changed files with 81 additions and 86 deletions
@@ -57,6 +57,8 @@ once_cell = "1.19"
# EasyTier core
easytier = { path = "../../easytier" }
mimalloc = { version = "*" }
# Testing
[dev-dependencies]
mockall = "0.12"
+6 -1
View File
@@ -23,6 +23,11 @@ use tracing_subscriber::EnvFilter;
use crate::db::cleanup::{CleanupConfig, CleanupManager};
use mimalloc::MiMalloc;
#[global_allocator]
static GLOBAL_MIMALLOC: MiMalloc = MiMalloc;
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {
@@ -31,7 +36,7 @@ struct Args {
admin_password: Option<String>,
}
#[tokio::main]
#[tokio::main(flavor = "multi_thread", worker_threads = 4)]
async fn main() -> anyhow::Result<()> {
// 加载配置
let config = AppConfig::default();