Enable jemalloc only on linux

This commit is contained in:
Kerollmops 2020-05-11 18:28:24 +02:00
parent e3e32e7f2b
commit 48e94b4372
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 4 additions and 2 deletions

View File

@ -44,12 +44,14 @@ zerocopy = "0.3.0"
assert_matches = "1.3.0" assert_matches = "1.3.0"
criterion = "0.3.1" criterion = "0.3.1"
csv = "1.1.3" csv = "1.1.3"
jemallocator = "0.3.2"
rustyline = { version = "6.0.0", default-features = false } rustyline = { version = "6.0.0", default-features = false }
structopt = "0.3.12" structopt = "0.3.12"
tempfile = "3.1.0" tempfile = "3.1.0"
termcolor = "1.1.0" termcolor = "1.1.0"
[target.'cfg(unix)'.dev-dependencies]
jemallocator = "0.3.2"
[[bench]] [[bench]]
name = "search_benchmark" name = "search_benchmark"
harness = false harness = false

View File

@ -16,7 +16,7 @@ use meilisearch_core::{Database, DatabaseOptions, Highlight, ProcessedUpdateResu
use meilisearch_core::settings::Settings; use meilisearch_core::settings::Settings;
use meilisearch_schema::FieldId; use meilisearch_schema::FieldId;
// #[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
#[global_allocator] #[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;