From 6c659dc12fc0b68c0b1f909ebf7e6c0fba936ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Mon, 20 Mar 2023 09:41:37 +0100 Subject: [PATCH] Use MiMalloc in milli tests --- Cargo.lock | 1 + milli/Cargo.toml | 1 + milli/src/lib.rs | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 853d1a896..0bdad9131 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2645,6 +2645,7 @@ dependencies = [ "maplit", "md5", "memmap2", + "mimalloc", "obkv", "once_cell", "ordered-float", diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 04591e8fd..224878cd1 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -58,6 +58,7 @@ logging_timer = "1.1.0" csv = "1.1.6" [dev-dependencies] +mimalloc = { version = "0.1.29", default-features = false } big_s = "1.0.2" insta = "1.21.0" maplit = "1.0.2" diff --git a/milli/src/lib.rs b/milli/src/lib.rs index 865195df5..6de737042 100644 --- a/milli/src/lib.rs +++ b/milli/src/lib.rs @@ -1,7 +1,15 @@ #![cfg_attr(all(test, fuzzing), feature(no_coverage))] +#![allow(unused, clippy::type_complexity)] + +#[cfg(test)] +#[global_allocator] +static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; + #[macro_use] pub mod documents; +pub use search::new; + mod asc_desc; mod criterion; mod error;