diff --git a/Cargo.lock b/Cargo.lock index 606e44efc92..deaa9449d06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1664,6 +1664,7 @@ dependencies = [ "indexmap", "insta", "itertools 0.12.1", + "jj-cbits", "jj-cli", "jj-lib", "libc", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index cb0e83e455d..05f37c83b5c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -51,6 +51,7 @@ gix = { workspace = true } hex = { workspace = true } indexmap = { workspace = true } itertools = { workspace = true } +jj-cbits = { workspace = true } jj-lib = { workspace = true } maplit = { workspace = true } minus = { workspace = true } diff --git a/cli/src/main.rs b/cli/src/main.rs index 8b2b2943d8c..38ea1a6870d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -12,8 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +use jj_cbits::mimalloc::MiMalloc; use jj_cli::cli_util::CliRunner; +#[global_allocator] +static ALLOC: MiMalloc = MiMalloc; + fn main() -> std::process::ExitCode { CliRunner::init().version(env!("JJ_VERSION")).run() }