Skip to content

Commit

Permalink
Use tikv-jemallocator instead of jemallocator
Browse files Browse the repository at this point in the history
From documentation of the tikv-jemallocator project:

> The project is also published as jemallocator for historical reasons. The two crates are the same except names.
> For new projects, it's recommended to use tikv-xxx versions instead.
  • Loading branch information
tmccombs committed Jun 7, 2024
1 parent f1a4a29 commit 7b33fa7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ libc = "0.2"
# jemalloc is currently disabled on macOS due to a bug in jemalloc in combination with macOS
# Catalina. See https://github.com/sharkdp/fd/issues/498 for details.
[target.'cfg(all(not(windows), not(target_os = "android"), not(target_os = "macos"), not(target_os = "freebsd"), not(target_os = "openbsd"), not(all(target_env = "musl", target_pointer_width = "32")), not(target_arch = "riscv64")))'.dependencies]
jemallocator = {version = "0.5.4", optional = true}
tikv-jemallocator = {version = "0.5.4", optional = true}

[dev-dependencies]
diff = "0.1"
Expand All @@ -89,7 +89,7 @@ codegen-units = 1
panic = "abort"

[features]
use-jemalloc = ["jemallocator"]
use-jemalloc = ["tikv-jemallocator"]
completions = ["clap_complete"]
base = ["use-jemalloc"]
default = ["use-jemalloc", "completions"]
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use crate::regex_helper::{pattern_has_uppercase_char, pattern_matches_strings_wi
feature = "use-jemalloc"
))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

// vivid --color-mode 8-bit generate molokai
const DEFAULT_LS_COLORS: &str = "
Expand Down

0 comments on commit 7b33fa7

Please sign in to comment.