From 6710856c1098f71168c47451af53bac9a33b49dd Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Tue, 14 Jul 2020 00:12:49 +0000 Subject: Add opt-in mimalloc feature --- crates/ra_prof/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_prof/src/lib.rs') diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index 7163a8424..b54531b4e 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs @@ -19,6 +19,10 @@ pub use crate::{ #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; +#[cfg(all(feature = "mimalloc"))] +#[global_allocator] +static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; + /// Prints backtrace to stderr, useful for debugging. #[cfg(feature = "backtrace")] pub fn print_backtrace() { -- cgit v1.2.3