Skip to content

Commit b7cf607

Browse files
committed
mimalloc for aarch64
1 parent d34a003 commit b7cf607

4 files changed

Lines changed: 32 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131

3232
- name: Linux aarch64
3333
target: aarch64-unknown-linux-musl
34-
build-args: "--release --features=jemalloc"
35-
JEMALLOC_SYS_WITH_LG_PAGE: "16"
34+
build-args: "--release --no-default-features --features ring,mimalloc"
3635

3736
- name: Linux armv7hf
3837
target: armv7-unknown-linux-musleabihf
@@ -52,7 +51,7 @@ jobs:
5251

5352
- name: Android aarch64
5453
target: aarch64-linux-android
55-
build-args: "--release --features=jemalloc"
54+
build-args: "--release --features=mimalloc"
5655

5756
- name: Android armv7
5857
target: armv7-linux-androideabi
@@ -73,7 +72,7 @@ jobs:
7372
- name: MacOS aarch64
7473
os: macos-latest
7574
target: aarch64-apple-darwin
76-
build-args: "--release --features=jemalloc"
75+
build-args: "--release --features=mimalloc"
7776

7877
# - name: iOS x86_64
7978
# target: x86_64-apple-ios

Cargo.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wstunnel-cli/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ tracing-subscriber = { version = "0.3.20", features = ["env-filter", "fmt", "loc
1313
wstunnel = { path = "../wstunnel", default-features = false, features = ["clap"] }
1414

1515
tikv-jemallocator = { version = "0.6", optional = true }
16+
mimalloc = { version = "0.1", optional = true }
1617

1718
[features]
1819
default = ["aws-lc-rs"]
1920
jemalloc = ["dep:tikv-jemallocator"]
21+
mimalloc = ["dep:mimalloc"]
2022
aws-lc-rs = ["wstunnel/aws-lc-rs"]
2123
ring = ["wstunnel/ring"]
2224
aws-lc-rs-bindgen = ["wstunnel/aws-lc-rs-bindgen"]

wstunnel-cli/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ use tikv_jemallocator::Jemalloc;
1616
#[global_allocator]
1717
static GLOBAL: Jemalloc = Jemalloc;
1818

19+
#[cfg(feature = "mimalloc")]
20+
use mimalloc::MiMalloc;
21+
22+
#[cfg(feature = "mimalloc")]
23+
#[global_allocator]
24+
static GLOBAL: MiMalloc = MiMalloc;
25+
1926
/// Use Websocket or HTTP2 protocol to tunnel {TCP,UDP} traffic
2027
/// wsTunnelClient <---> wsTunnelServer <---> RemoteHost
2128
#[derive(clap::Parser, Debug)]

0 commit comments

Comments
 (0)