mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-22 06:49:08 +00:00
mimalloc usage
This commit is contained in:
parent
6567b6bc00
commit
1dd6746bbc
2 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,7 @@ hickory-proto = "0.24"
|
|||
httparse = "1"
|
||||
ipstack = { version = "0.1" }
|
||||
log = { version = "0.4", features = ["std"] }
|
||||
mimalloc = { version = "0.1", default-features = false, optional = true }
|
||||
percent-encoding = "2"
|
||||
socks5-impl = { version = "0.5" }
|
||||
thiserror = "1"
|
||||
|
|
|
@ -30,6 +30,10 @@ pub use {
|
|||
traffic_status::{tun2proxy_set_traffic_status_callback, TrafficStatus},
|
||||
};
|
||||
|
||||
#[cfg(feature = "mimalloc")]
|
||||
#[global_allocator]
|
||||
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
|
||||
pub use desktop_api::desktop_run_async;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue