Skip to content

Commit 6dead89

Browse files
authored
Fix Jemalloc not used in regular build (#5784)
1 parent b76b924 commit 6dead89

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

quickwit/quickwit-cli/src/jemalloc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ use quickwit_common::metrics::MEMORY_METRICS;
1818
use tikv_jemallocator::Jemalloc;
1919
use tracing::error;
2020

21-
#[global_allocator]
2221
#[cfg(feature = "jemalloc-profiled")]
22+
#[global_allocator]
2323
pub static GLOBAL: quickwit_common::jemalloc_profiled::JemallocProfiled =
2424
quickwit_common::jemalloc_profiled::JemallocProfiled(Jemalloc);
25+
2526
#[cfg(not(feature = "jemalloc-profiled"))]
27+
#[global_allocator]
2628
pub static GLOBAL: Jemalloc = Jemalloc;
2729

2830
const JEMALLOC_METRICS_POLLING_INTERVAL: Duration = Duration::from_secs(1);

0 commit comments

Comments
 (0)