0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-12-22 20:38:22 -05:00

⚙️ refactor: replace jemalloc with mimalloc (#178)(#180)

This commit is contained in:
neon_arch 2023-08-29 20:07:28 +03:00
parent fceacdb916
commit 028463bb36

View File

@ -3,6 +3,7 @@
//! This module contains the main function which handles the logging of the application to the
//! stdout and handles the command line arguments provided and launches the `websurfx` server.
use mimalloc::MiMalloc;
use std::net::TcpListener;
use websurfx::{config::parser::Config, run};
@ -11,6 +12,10 @@ use websurfx::{config::parser::Config, run};
#[global_allocator]
static ALLOC: dhat::Alloc = dhat::Alloc;
#[cfg(not(feature = "dhat-heap"))]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
/// The function that launches the main server and registers all the routes of the website.
///
/// # Error