aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_prof
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-22 12:42:53 +0100
committerAleksey Kladov <[email protected]>2020-07-22 12:42:53 +0100
commit9ad41eb9085cd7ceaf479f659a7071df81059b7c (patch)
tree6dfcadbf3b6a333777f22f54db773118bf1916d4 /crates/ra_prof
parentdeed44a472edaf11d35fa98c7e68a288f8dfe93f (diff)
Setup global allocator in the correct crate
It worked before, but was roundabout
Diffstat (limited to 'crates/ra_prof')
-rw-r--r--crates/ra_prof/Cargo.toml2
-rw-r--r--crates/ra_prof/src/lib.rs4
2 files changed, 0 insertions, 6 deletions
diff --git a/crates/ra_prof/Cargo.toml b/crates/ra_prof/Cargo.toml
index 84d895317..6c214501e 100644
--- a/crates/ra_prof/Cargo.toml
+++ b/crates/ra_prof/Cargo.toml
@@ -13,7 +13,6 @@ doctest = false
13ra_arena = { path = "../ra_arena" } 13ra_arena = { path = "../ra_arena" }
14once_cell = "1.3.1" 14once_cell = "1.3.1"
15backtrace = { version = "0.3.44", optional = true } 15backtrace = { version = "0.3.44", optional = true }
16mimalloc = { version = "0.1.19", default-features = false, optional = true }
17cfg-if = "0.1.10" 16cfg-if = "0.1.10"
18libc = "0.2.73" 17libc = "0.2.73"
19 18
@@ -22,5 +21,4 @@ cpu_profiler = []
22 21
23# Uncomment to enable for the whole crate graph 22# Uncomment to enable for the whole crate graph
24# default = [ "backtrace" ] 23# default = [ "backtrace" ]
25# default = [ "mimalloc" ]
26# default = [ "cpu_profiler" ] 24# default = [ "cpu_profiler" ]
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs
index a5b408a1d..ba5609703 100644
--- a/crates/ra_prof/src/lib.rs
+++ b/crates/ra_prof/src/lib.rs
@@ -13,10 +13,6 @@ pub use crate::{
13 memory_usage::{Bytes, MemoryUsage}, 13 memory_usage::{Bytes, MemoryUsage},
14}; 14};
15 15
16#[cfg(all(feature = "mimalloc"))]
17#[global_allocator]
18static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
19
20/// Prints backtrace to stderr, useful for debugging. 16/// Prints backtrace to stderr, useful for debugging.
21#[cfg(feature = "backtrace")] 17#[cfg(feature = "backtrace")]
22pub fn print_backtrace() { 18pub fn print_backtrace() {