Skip to content

Commit

Permalink
Disable jemalloc on canary macOS builds (#9908)
Browse files Browse the repository at this point in the history
* Disable jemalloc on canary macOS builds

* Add comment on disabling jemallocator
  • Loading branch information
yamadapc committed Aug 12, 2024
1 parent d6a89da commit 4abdb26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/node-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ rayon = "1.7.0"
getrandom = { version = "0.2", features = ["custom"], default-features = false }
napi = { version = "2.16.4", features = ["serde-json"] }

[target.'cfg(target_os = "macos")'.dependencies]
[target.'cfg(all(target_os = "macos", not(feature = "canary")))'.dependencies]
# jemallocator is disabled on canary builds to experiment with its performance
# and reliability
jemallocator = { version = "0.3.2", features = ["disable_initial_exec_tls"] }

[target.'cfg(windows)'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/node-bindings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::alloc::alloc;
#[cfg(target_arch = "wasm32")]
use std::alloc::Layout;

#[cfg(all(target_os = "macos", not(miri)))]
#[cfg(all(target_os = "macos", not(miri), not(feature = "canary")))]
#[global_allocator]
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;

Expand Down

0 comments on commit 4abdb26

Please sign in to comment.