From 1aae4b8c8ebc2548478b713d17b05d79ac98b37c Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Thu, 26 Feb 2026 17:39:40 +0000 Subject: [PATCH] feat(remoteingress-bin): use mimalloc as the global allocator to reduce memory overhead and improve allocation performance --- changelog.md | 7 +++++++ rust/Cargo.lock | 20 ++++++++++++++++++++ rust/crates/remoteingress-bin/Cargo.toml | 1 + rust/crates/remoteingress-bin/src/main.rs | 3 +++ ts/00_commitinfo_data.ts | 2 +- 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 911abf5..1477281 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2026-02-26 - 4.1.0 - feat(remoteingress-bin) +use mimalloc as the global allocator to reduce memory overhead and improve allocation performance + +- added mimalloc = "0.1" dependency to rust/crates/remoteingress-bin/Cargo.toml +- registered mimalloc as the #[global_allocator] in rust/crates/remoteingress-bin/src/main.rs +- updated Cargo.lock with libmimalloc-sys and mimalloc package entries + ## 2026-02-26 - 4.0.1 - fix(hub) cancel per-stream tokens on stream close and avoid duplicate StreamClosed events; bump @types/node devDependency to ^25.3.0 diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 1cb62fc..861b654 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -327,6 +327,16 @@ version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" +[[package]] +name = "libmimalloc-sys" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "lock_api" version = "0.4.14" @@ -348,6 +358,15 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "mimalloc" +version = "0.1.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8" +dependencies = [ + "libmimalloc-sys", +] + [[package]] name = "mio" version = "1.1.1" @@ -519,6 +538,7 @@ dependencies = [ "clap", "env_logger", "log", + "mimalloc", "remoteingress-core", "remoteingress-protocol", "rustls", diff --git a/rust/crates/remoteingress-bin/Cargo.toml b/rust/crates/remoteingress-bin/Cargo.toml index 8cb6838..32dc16c 100644 --- a/rust/crates/remoteingress-bin/Cargo.toml +++ b/rust/crates/remoteingress-bin/Cargo.toml @@ -17,3 +17,4 @@ serde_json = "1" log = "0.4" env_logger = "0.11" rustls = { version = "0.23", default-features = false, features = ["ring"] } +mimalloc = "0.1" diff --git a/rust/crates/remoteingress-bin/src/main.rs b/rust/crates/remoteingress-bin/src/main.rs index 3e98fdd..3c06683 100644 --- a/rust/crates/remoteingress-bin/src/main.rs +++ b/rust/crates/remoteingress-bin/src/main.rs @@ -1,3 +1,6 @@ +#[global_allocator] +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; + use clap::Parser; use serde::{Deserialize, Serialize}; use std::sync::Arc; diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 88ccd95..9c9bc67 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/remoteingress', - version: '4.0.1', + version: '4.1.0', description: 'Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.' }