diff options
author | Thomas Linford <linford.t@gmail.com> | 2023-02-03 10:02:55 +0100 |
---|---|---|
committer | Thomas Linford <linford.t@gmail.com> | 2023-03-27 12:09:31 +0200 |
commit | 415aba59bdbd9eef4d520065773edee84b6bff6e (patch) | |
tree | 9c70e1cf1c4842f6f1e60f0e4ccedabff62b183d | |
parent | 61a9b06237d1b84a6af5132f43b9f48902e2dc80 (diff) |
setup jemallocjemalloc
-rw-r--r-- | Cargo.lock | 28 | ||||
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | src/main.rs | 5 |
3 files changed, 34 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock index fb040fad2..16ef133b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -997,6 +997,12 @@ dependencies = [ ] [[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + +[[package]] name = "futures-channel" version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2986,6 +2992,27 @@ dependencies = [ ] [[package]] +name = "tikv-jemalloc-sys" +version = "0.5.2+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec45c14da997d0925c7835883e4d5c181f196fa142f8c19d7643d1e9af2592c3" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20612db8a13a6c06d57ec83953694185a367e16945f66565e8028d2c0bd76979" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + +[[package]] name = "time" version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3960,6 +3987,7 @@ dependencies = [ "ssh2", "suggest", "thiserror", + "tikv-jemallocator", "zellij-client", "zellij-server", "zellij-utils", diff --git a/Cargo.toml b/Cargo.toml index bb1bfbce8..64ff8ad62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ zellij-utils = { path = "zellij-utils/", version = "0.36.0" } log = "0.4.17" dialoguer = "0.10.1" suggest = "0.4" +tikv-jemallocator = "0.5.0" [dev-dependencies] insta = { version = "1.6.0", features = ["backtrace"] } diff --git a/src/main.rs b/src/main.rs index 54ca71cb4..80ff325bb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,11 @@ mod sessions; #[cfg(test)] mod tests; +use tikv_jemallocator::Jemalloc; + +#[global_allocator] +static GLOBAL: Jemalloc = Jemalloc; + use zellij_utils::{ clap::Parser, cli::{CliAction, CliArgs, Command, Sessions}, |