Skip to content

Commit 398a2fb

Browse files
committed
chore(api): switch to jemalloc
1 parent 1afd567 commit 398a2fb

5 files changed

Lines changed: 30 additions & 2 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ zip = { version = "8.4.0", default-features = false }
8080
zstd = "0.13.3"
8181
argon2 = "0.5.3"
8282

83+
[target.'cfg(target_os = "linux")'.dependencies]
84+
tikv-jemallocator = "0.6.1"
85+
8386
[dev-dependencies]
8487
ctor = "0.6.3"
8588
httpmock = "0.8.3"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
FROM rust:1.93-slim-trixie@sha256:c0a38f5662afdb298898da1d70b909af4bda4e0acff2dc52aea6360a9b9c6956 AS server_builder
44

55
ARG TARGETARCH
6-
ARG UPX_VERSION=5.1.0
6+
ARG UPX_VERSION=5.1.1
77

88
## Statically link binary to OpenSSL libraries.
99
ENV OPENSSL_STATIC=yes

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ use clap::{Arg, Command, crate_authors, crate_description, crate_version, value_
2323
use std::env;
2424
use tracing::info;
2525

26+
#[cfg(target_os = "linux")]
27+
#[global_allocator]
28+
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
29+
2630
fn main() -> Result<(), anyhow::Error> {
2731
dotenvy::dotenv().ok();
2832

0 commit comments

Comments
 (0)