aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_prof/src/lib.rs
diff options
context:
space:
mode:
authorIvan Kozik <[email protected]>2020-07-14 01:12:49 +0100
committerIvan Kozik <[email protected]>2020-07-14 21:57:51 +0100
commit6710856c1098f71168c47451af53bac9a33b49dd (patch)
tree46a514e5fd86dd33f16f9abca6ab14f5063c9696 /crates/ra_prof/src/lib.rs
parent46d4487b8900324fc6a523c8b6ebe036d28fd0fb (diff)
Add opt-in mimalloc feature
Diffstat (limited to 'crates/ra_prof/src/lib.rs')
-rw-r--r--crates/ra_prof/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
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::{
19#[global_allocator] 19#[global_allocator]
20static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; 20static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
21 21
22#[cfg(all(feature = "mimalloc"))]
23#[global_allocator]
24static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
25
22/// Prints backtrace to stderr, useful for debugging. 26/// Prints backtrace to stderr, useful for debugging.
23#[cfg(feature = "backtrace")] 27#[cfg(feature = "backtrace")]
24pub fn print_backtrace() { 28pub fn print_backtrace() {