From 3a11e39c010d474129e1c4816c61d9f96bdead00 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Wed, 4 Dec 2024 17:52:53 +0100 Subject: [PATCH] Force max_memory to a min of 100MiB --- crates/milli/src/update/new/indexer/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/milli/src/update/new/indexer/mod.rs b/crates/milli/src/update/new/indexer/mod.rs index 383823de1..9ee7577a5 100644 --- a/crates/milli/src/update/new/indexer/mod.rs +++ b/crates/milli/src/update/new/indexer/mod.rs @@ -88,7 +88,9 @@ where // 2% of the indexing memory let total_bbbuffer_capacity = (max_memory / 100 / 2).max(minimum_capacity); let new_grenad_parameters = GrenadParameters { - max_memory: Some(max_memory.saturating_sub(total_bbbuffer_capacity)), + max_memory: Some( + max_memory.saturating_sub(total_bbbuffer_capacity).max(100 * 1024 * 1024), + ), ..grenad_parameters }; (new_grenad_parameters, total_bbbuffer_capacity)