Use jemalloc for non-MSVC targets

next
Sayan Nandan 4 years ago
parent d366f887a9
commit b3500ee3b9
No known key found for this signature in database
GPG Key ID: C31EFD7DDA12AEE0

34
Cargo.lock generated

@ -63,6 +63,12 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
[[package]]
name = "cc"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381"
[[package]]
name = "cfg-if"
version = "0.1.10"
@ -119,6 +125,12 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "fs_extra"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
@ -185,6 +197,27 @@ dependencies = [
"libc",
]
[[package]]
name = "jemalloc-sys"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45"
dependencies = [
"cc",
"fs_extra",
"libc",
]
[[package]]
name = "jemallocator"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69"
dependencies = [
"jemalloc-sys",
"libc",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
@ -537,6 +570,7 @@ dependencies = [
"bytes",
"clap",
"env_logger",
"jemallocator",
"lazy_static",
"libtdb",
"log",

@ -19,5 +19,9 @@ toml = "0.5.6"
clap = {version = "2.33.3", features=["yaml"]}
env_logger = "0.7.1"
log = "0.4.11"
[target.'cfg(not(target_env = "msvc"))'.dependencies]
jemallocator = "0.3.2"
[dev-dependencies]
tokio = { version = "0.2", features = ["test-util"] }
tokio = { version = "0.2", features = ["test-util"] }

@ -35,6 +35,14 @@ use env_logger::*;
use tokio::signal;
#[cfg(test)]
mod tests;
#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
static MSG: &'static str = "TerrabaseDB v0.4.1 | https://github.com/terrabasedb/terrabase";
static TEXT: &'static str = "
_______ _ _____ ____

Loading…
Cancel
Save