From b1d418fb6f44dce7df8563ff4d75f598c4ff4a26 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Fri, 22 Nov 2024 14:23:05 +0100 Subject: [PATCH] feat: Add new jemalloc feature, enabled by default --- CHANGELOG.md | 3 +++ daemon/Cargo.toml | 4 +++- daemon/src/main.rs | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fec91c0..f312309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # 1.1.1 +## New features +- Make jemalloc feature optional, enabled by default + ## Bug fixes - Fix build on non x86_64 architectures diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index 96f7955..69be379 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -36,8 +36,8 @@ serde_json = "1.0.133" wayland-egl = "0.32.4" khronos-egl = { version = "6.0.0", features = [ "static" ] } format-bytes = "0.3.0" -tikv-jemallocator = "0.6.0" ctrlc = { version = "3.4.5", features = ["termination"] } +tikv-jemallocator = { version = "0.6.0", optional = true} [build-dependencies] clap = { version = "4.5.21", features = ["derive", "cargo"] } @@ -47,4 +47,6 @@ gl_generator = "0.14.0" [features] avif = ["image/avif-native"] +jemalloc = ["dep:tikv-jemallocator"] +default = ["jemalloc"] diff --git a/daemon/src/main.rs b/daemon/src/main.rs index e26cdc6..3fa3563 100644 --- a/daemon/src/main.rs +++ b/daemon/src/main.rs @@ -54,8 +54,10 @@ use xdg::BaseDirectories; use crate::wpaperd::Wpaperd; +#[cfg(feature = "jemalloc")] use tikv_jemallocator::Jemalloc; +#[cfg(feature = "jemalloc")] #[global_allocator] static GLOBAL: Jemalloc = Jemalloc;