From 028463bb362df5a6b78b9a0880249aea45fb36f9 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Tue, 29 Aug 2023 20:07:28 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20refactor:=20replace=20jema?= =?UTF-8?q?lloc=20with=20mimalloc=20(#178)(#180)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/websurfx.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/websurfx.rs b/src/bin/websurfx.rs index 9aa5b69..bc8e7ce 100644 --- a/src/bin/websurfx.rs +++ b/src/bin/websurfx.rs @@ -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