Use jemallocator in main server (#353)

This commit is contained in:
Firstyear 2021-02-10 15:08:22 +10:00 committed by GitHub
parent a3d7401d03
commit d745b15768
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 0 deletions

28
Cargo.lock generated
View file

@ -1132,6 +1132,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "futures"
version = "0.3.12"
@ -1573,6 +1579,27 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[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 = "js-sys"
version = "0.3.46"
@ -1600,6 +1627,7 @@ dependencies = [
"futures-util",
"hashbrown",
"idlset",
"jemallocator",
"kanidm_proto",
"lazy_static",
"ldap3_server",

View file

@ -28,6 +28,8 @@ path = "src/server/main.rs"
[dependencies]
kanidm_proto = { path = "../kanidm_proto", version = "1.1.0-alpha" }
jemallocator = "0.3.0"
url = "2.1"
tide = "0.15"
async-trait = "0.1"

View file

@ -8,6 +8,9 @@
#![deny(clippy::needless_pass_by_value)]
#![deny(clippy::trivially_copy_pass_by_ref)]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[macro_use]
extern crate log;
#[macro_use]