Skip to content

Commit

Permalink
Add tikv-jemallocator as non-MSVC dependency and configure as global …
Browse files Browse the repository at this point in the history
…allocator in geph5-exit
  • Loading branch information
nullchinchilla committed Apr 1, 2024
1 parent 5438396 commit e5dc8f0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions binaries/geph5-exit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ tachyonix = "0.2.1"
mizaru2={path="../../libraries/mizaru2"}
governor = "0.6.3"
quanta = "0.12.2"

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5"
7 changes: 7 additions & 0 deletions binaries/geph5-exit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ mod listen;
mod proxy;
mod ratelimit;

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

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

/// The global config file.
static CONFIG_FILE: OnceCell<ConfigFile> = OnceCell::new();

Expand Down

0 comments on commit e5dc8f0

Please sign in to comment.