Summary
Upgrading from mimalloc v3.1.5 to v3.3.0 (or v3.3.1) causes an ~81% increase in resident set size for a long-running Rust async service on Alpine/musl, with no application code changes.
Environment
OS: Alpine 3.21 (musl libc), aarch64-unknown-linux-musl static build
Compiler: Rust 1.94.1 via cc crate (musl-gcc)
Build flags: LTO (fat), codegen-units = 1, panic = abort
Runtime: tokio (8 worker threads), long-running HTTP + MQTT service
Observed on: Linux/Kubernetes (Docker), macOS/Podman (Apple Virtualization, ARM64)
Measurements
Idle RSS after startup + health-check warmup, read from /proc//status (VmRSS):
| mimalloc C version |
Rust crate |
VmRSS |
| v3.1.5 |
0.1.48 + features=["v3"] |
26 MB |
| v3.3.0 |
0.1.49 |
45 MB |
| v3.3.1 (latest) |
0.1.50 |
47 MB |
| v2.2.2 (default in 0.1.48) |
0.1.48 (no v3 feature) |
54 MB |
All builds from the same application source, same compiler, same flags — only the mimalloc version differs.
Reproduction
- Build the same Rust binary twice: once linking mimalloc v3.1.5, once linking v3.3.1
- Run both on Alpine/musl (aarch64 or x86_64)
- Compare VmRSS after a few seconds of idle + health-check traffic
Workaround
Pinned to mimalloc crate 0.1.48 with features = ["v3"] (→ C v3.1.5).
Possibly related
#1104 — arena lock contention / page-map overhead in dev3+
#1014 — memory regression reported by Bun
#1025 — excessive memory retention
Summary
Upgrading from mimalloc v3.1.5 to v3.3.0 (or v3.3.1) causes an ~81% increase in resident set size for a long-running Rust async service on Alpine/musl, with no application code changes.
Environment
OS: Alpine 3.21 (musl libc), aarch64-unknown-linux-musl static build
Compiler: Rust 1.94.1 via cc crate (musl-gcc)
Build flags: LTO (fat), codegen-units = 1, panic = abort
Runtime: tokio (8 worker threads), long-running HTTP + MQTT service
Observed on: Linux/Kubernetes (Docker), macOS/Podman (Apple Virtualization, ARM64)
Measurements
Idle RSS after startup + health-check warmup, read from /proc//status (VmRSS):
All builds from the same application source, same compiler, same flags — only the mimalloc version differs.
Reproduction
Workaround
Pinned to mimalloc crate 0.1.48 with features = ["v3"] (→ C v3.1.5).
Possibly related
#1104 — arena lock contention / page-map overhead in dev3+
#1014 — memory regression reported by Bun
#1025 — excessive memory retention