From 48e94b43723fdeca2a0307ff8eaa23776b402ac6 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Mon, 11 May 2020 18:28:24 +0200 Subject: [PATCH] Enable jemalloc only on linux --- meilisearch-core/Cargo.toml | 4 +++- meilisearch-core/examples/from_file.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meilisearch-core/Cargo.toml b/meilisearch-core/Cargo.toml index 00e8640d0..1706b9af6 100644 --- a/meilisearch-core/Cargo.toml +++ b/meilisearch-core/Cargo.toml @@ -44,12 +44,14 @@ zerocopy = "0.3.0" assert_matches = "1.3.0" criterion = "0.3.1" csv = "1.1.3" -jemallocator = "0.3.2" rustyline = { version = "6.0.0", default-features = false } structopt = "0.3.12" tempfile = "3.1.0" termcolor = "1.1.0" +[target.'cfg(unix)'.dev-dependencies] +jemallocator = "0.3.2" + [[bench]] name = "search_benchmark" harness = false diff --git a/meilisearch-core/examples/from_file.rs b/meilisearch-core/examples/from_file.rs index fad6f4e3c..ed3711960 100644 --- a/meilisearch-core/examples/from_file.rs +++ b/meilisearch-core/examples/from_file.rs @@ -16,7 +16,7 @@ use meilisearch_core::{Database, DatabaseOptions, Highlight, ProcessedUpdateResu use meilisearch_core::settings::Settings; use meilisearch_schema::FieldId; -// #[cfg(target_os = "linux")] +#[cfg(target_os = "linux")] #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;