about summary refs log tree commit diff
path: root/tvix/nar-bridge/src
diff options
context:
space:
mode:
authorIlan Joselevich <personal@ilanjoselevich.com>2024-08-07T21·21+0300
committerIlan Joselevich <personal@ilanjoselevich.com>2024-08-08T08·06+0000
commitf648f17ec3dd9b99d6271f607d62004c321b7c8f (patch)
tree5fe247815cc72c39675cf80f178d9c6865b5c93e /tvix/nar-bridge/src
parent000fb856befa667bfc4ac36fe3794f97ad34a1bd (diff)
feat(tvix): Jemalloc -> MiMalloc r/8461
Use the faster and newer MiMalloc memory allocator for all endpoints in
the workspace.

Change-Id: Ic60237284ed168e46ec6e8f28e2710bae4385c6f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12149
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Diffstat (limited to 'tvix/nar-bridge/src')
-rw-r--r--tvix/nar-bridge/src/bin/nar-bridge.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/nar-bridge/src/bin/nar-bridge.rs b/tvix/nar-bridge/src/bin/nar-bridge.rs
index cf312649d147..48eba0ac44ac 100644
--- a/tvix/nar-bridge/src/bin/nar-bridge.rs
+++ b/tvix/nar-bridge/src/bin/nar-bridge.rs
@@ -1,10 +1,14 @@
 use clap::Parser;
+use mimalloc::MiMalloc;
 use nar_bridge::AppState;
 use tower::ServiceBuilder;
 use tower_http::trace::{DefaultMakeSpan, TraceLayer};
 use tracing::info;
 use tvix_store::utils::ServiceUrlsGrpc;
 
+#[global_allocator]
+static GLOBAL: MiMalloc = MiMalloc;
+
 /// Expose the Nix HTTP Binary Cache protocol for a tvix-store.
 #[derive(Parser)]
 #[command(author, version, about, long_about = None)]