raker: Switch to Jemalloc for the global allocator
ci/woodpecker/push/check Pipeline failed Details
ci/woodpecker/push/manual Pipeline failed Details
ci/woodpecker/push/release Pipeline was successful Details

This commit is contained in:
Olivier 'reivilibre' 2023-03-22 23:08:08 +00:00
parent 4f5977002b
commit 626b448245
3 changed files with 25 additions and 0 deletions

21
Cargo.lock generated
View File

@ -3844,6 +3844,7 @@ dependencies = [
"sitemap",
"smartstring",
"tempfile",
"tikv-jemallocator",
"tokio",
"webp",
"zstd",
@ -4879,6 +4880,26 @@ dependencies = [
"weezl",
]
[[package]]
name = "tikv-jemalloc-sys"
version = "0.5.3+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8"
dependencies = [
"cc",
"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"

View File

@ -59,6 +59,7 @@ smartstring = "1.0.0"
signal-hook = "0.3.13"
nix = "0.23.1"
quickpeep_html_charset_detection = { version = "0.1.0", path = "../quickpeep_html_charset_detection" }
tikv-jemallocator = "0.5.0"
### Raking helpers
# HTTP Requests

View File

@ -60,6 +60,9 @@ pub struct Opts {
concurrent_sleepers: u32,
}
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[tokio::main]
pub async fn main() -> anyhow::Result<()> {
env_logger::Builder::from_env(