mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
Make mimalloc optional for udp and http
This commit is contained in:
parent
f061c47ef8
commit
7795a1a532
5 changed files with 21 additions and 5 deletions
|
|
@ -18,13 +18,17 @@ name = "aquatic_udp"
|
|||
name = "aquatic_udp"
|
||||
|
||||
[features]
|
||||
default = ["prometheus"]
|
||||
default = ["prometheus", "mimalloc"]
|
||||
# Export prometheus metrics
|
||||
prometheus = ["metrics", "aquatic_common/prometheus"]
|
||||
# Experimental io_uring support (Linux 6.0 or later required)
|
||||
io-uring = ["dep:io-uring"]
|
||||
# Experimental CPU pinning support
|
||||
cpu-pinning = ["aquatic_common/cpu-pinning"]
|
||||
# Use mimalloc allocator for much better performance.
|
||||
#
|
||||
# Requires cmake and a C compiler
|
||||
mimalloc = ["dep:mimalloc"]
|
||||
|
||||
[dependencies]
|
||||
aquatic_common.workspace = true
|
||||
|
|
@ -45,7 +49,6 @@ hdrhistogram = "7"
|
|||
hex = "0.4"
|
||||
libc = "0.2"
|
||||
log = "0.4"
|
||||
mimalloc = { version = "0.1", default-features = false }
|
||||
mio = { version = "0.8", features = ["net", "os-poll"] }
|
||||
num-format = "0.4"
|
||||
parking_lot = "0.12"
|
||||
|
|
@ -63,6 +66,9 @@ metrics = { version = "0.22", optional = true }
|
|||
# io-uring feature
|
||||
io-uring = { version = "0.6", optional = true }
|
||||
|
||||
# mimalloc feature
|
||||
mimalloc = { version = "0.1", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
quickcheck = "1"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#[cfg(feature = "mimalloc")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue