diff options
author | Aleksey Kladov <[email protected]> | 2020-07-22 12:42:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-22 12:42:53 +0100 |
commit | 9ad41eb9085cd7ceaf479f659a7071df81059b7c (patch) | |
tree | 6dfcadbf3b6a333777f22f54db773118bf1916d4 /crates/ra_prof | |
parent | deed44a472edaf11d35fa98c7e68a288f8dfe93f (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.toml | 2 | ||||
-rw-r--r-- | crates/ra_prof/src/lib.rs | 4 |
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 | |||
13 | ra_arena = { path = "../ra_arena" } | 13 | ra_arena = { path = "../ra_arena" } |
14 | once_cell = "1.3.1" | 14 | once_cell = "1.3.1" |
15 | backtrace = { version = "0.3.44", optional = true } | 15 | backtrace = { version = "0.3.44", optional = true } |
16 | mimalloc = { version = "0.1.19", default-features = false, optional = true } | ||
17 | cfg-if = "0.1.10" | 16 | cfg-if = "0.1.10" |
18 | libc = "0.2.73" | 17 | libc = "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] | ||
18 | static 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")] |
22 | pub fn print_backtrace() { | 18 | pub fn print_backtrace() { |