summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2019-06-30 15:28:25 +0200
committerCanop <cano.petrole@gmail.com>2019-06-30 15:28:25 +0200
commit950f57168770798746860a8d1c6727a1f504322a (patch)
treec6c489bbc1b2865fd98ca5e4b8dbef43968bd355 /src/main.rs
parent18f3f758123e4b301cd7d93a544c2c3c697fd23c (diff)
use mimalloc as allocator on linux
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 3ad4225..49108dd 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,9 @@
#[cfg(unix)]
+use mimalloc::MiMalloc;
+#[cfg(unix)]
#[global_allocator]
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
+static GLOBAL: MiMalloc = MiMalloc;
+//static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[macro_use]
extern crate lazy_static;
@@ -83,6 +86,8 @@ fn configure_log() {
env!("CARGO_PKG_VERSION"),
level
);
+ #[cfg(unix)]
+ info!("allocator: Mimalloc");
}
}