Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ version = "0.1.0"
[lib]
crate-type = ["cdylib"]

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { version = "0.6", features = ["disable_initial_exec_tls"] }
Comment thread
amackillop marked this conversation as resolved.

[dependencies]
bitcoin-payment-instructions = { version = "0.5.0", default-features = false, features = [
"http",
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#![deny(clippy::all)]

/// Use jemalloc to reduce memory fragmentation during channel monitor
/// deserialization and node boot. glibc malloc fragments heavily with
/// Rust's alloc patterns (not available on Windows).
#[cfg(unix)]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

use std::{
collections::{HashMap, HashSet},
convert::TryFrom,
Expand Down
Loading