Skip to content

Commit 986dd49

Browse files
committedMar 16, 2024
feat: only use mimalloc;
1 parent 135008a commit 986dd49

File tree

5 files changed

+4
-44
lines changed

5 files changed

+4
-44
lines changed
 

Diff for: ‎Cargo.lock

-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎turn-balance/Cargo.toml

+1-6
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@ bytes = "1.5.0"
1515
log = "0.4.20"
1616
simple_logger = "4.3.0"
1717
num_cpus = "1.15"
18+
mimalloc = { version = "*", default-features = false }
1819

1920
[build-dependencies]
2021
prost-build = "0.12"
2122

22-
[target.'cfg(not(target_os = "windows"))'.dependencies]
23-
jemallocator = "0.5.4"
24-
25-
[target.'cfg(target_os = "windows")'.dependencies]
26-
mimalloc = "0.1.37"
27-
2823
[features]
2924
system_allocator = []

Diff for: ‎turn-balance/src/main.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#[global_allocator]
2-
#[cfg(all(target_os = "windows", not(feature = "system_allocator")))]
2+
#[cfg(not(feature = "system_allocator"))]
33
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
44

5-
#[global_allocator]
6-
#[cfg(all(not(target_os = "windows"), not(feature = "system_allocator")))]
7-
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
8-
95
mod cluster;
106
mod config;
117

Diff for: ‎turn-server/Cargo.toml

+1-6
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,10 @@ anyhow = "1.0"
3636
toml = "0.7"
3737
tonic = { version = "0.10", features = ["prost", "gzip", "tls"] }
3838
prost = "0.12"
39+
mimalloc = { version = "*", default-features = false }
3940

4041
[build-dependencies]
4142
tonic-build = "0.10"
4243

43-
[target.'cfg(not(target_os = "windows"))'.dependencies]
44-
jemallocator = "0.5.4"
45-
46-
[target.'cfg(target_os = "windows")'.dependencies]
47-
mimalloc = "0.1.37"
48-
4944
[features]
5045
system_allocator = []

Diff for: ‎turn-server/src/main.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#[global_allocator]
2-
#[cfg(all(target_os = "windows", not(feature = "system_allocator")))]
2+
#[cfg(not(feature = "system_allocator"))]
33
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
44

5-
#[global_allocator]
6-
#[cfg(all(not(target_os = "windows"), not(feature = "system_allocator")))]
7-
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
8-
95
use std::sync::Arc;
106
use turn_server::config::Config;
117

0 commit comments

Comments
 (0)
Please sign in to comment.