diff --git a/turn-server/Cargo.toml b/turn-server/Cargo.toml index c766f21..0b938fd 100644 --- a/turn-server/Cargo.toml +++ b/turn-server/Cargo.toml @@ -37,3 +37,4 @@ axum = "0.6.1" toml = "0.5.10" tower = "0.4" http = "0.2.8" +mimalloc = "0.1.34" diff --git a/turn-server/src/main.rs b/turn-server/src/main.rs index 21379d1..0c45d13 100644 --- a/turn-server/src/main.rs +++ b/turn-server/src/main.rs @@ -1,3 +1,9 @@ +use mimalloc::MiMalloc; + +// use mimalloc for global. +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + mod server; mod config; mod api;