Skip to content

Commit

Permalink
use tikv-jemallocator instead of jemallocator
Browse files Browse the repository at this point in the history
It looks like more active
  • Loading branch information
hatoo committed Jan 5, 2025
1 parent d1aeaa0 commit b83cbb8
Show file tree
Hide file tree
Showing 3 changed files with 29 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: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ tokio-vsock = { version = "0.5.0", optional = true }
rusqlite = { version = "0.32.0", features = ["bundled"] }
num_cpus = "1.16.0"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.6"

[target.'cfg(unix)'.dependencies]
rlimit = "0.10.1"
jemallocator = "0.5.4"

[target.x86_64-unknown-linux-musl.dependencies]
# Workaround for release CI
Expand Down
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ mod result_data;
mod timescale;
mod url_generator;

#[cfg(unix)]
#[cfg(not(target_env = "msvc"))]
use tikv_jemallocator::Jemalloc;

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
static GLOBAL: Jemalloc = Jemalloc;

#[derive(Parser)]
#[command(version, about, long_about = None)]
Expand Down

0 comments on commit b83cbb8

Please sign in to comment.