Skip to content

Commit

Permalink
feat: Add new jemalloc feature, enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
danyspin97 committed Nov 22, 2024
1 parent 725ef7d commit b1d418f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 3 additions & 1 deletion daemon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -47,4 +47,6 @@ gl_generator = "0.14.0"

[features]
avif = ["image/avif-native"]
jemalloc = ["dep:tikv-jemallocator"]
default = ["jemalloc"]

2 changes: 2 additions & 0 deletions daemon/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b1d418f

Please sign in to comment.