ledger-tool uses jemalloc like validator (#21351)

This commit is contained in:
Jeff Washington (jwash) 2021-11-19 09:48:07 -06:00 committed by GitHub
parent 79d21d6805
commit b1b334a17f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

1
Cargo.lock generated
View File

@ -5152,6 +5152,7 @@ dependencies = [
"solana-transaction-status",
"solana-version",
"solana-vote-program",
"tikv-jemallocator",
"tokio",
]

View File

@ -38,6 +38,9 @@ solana-version = { path = "../version", version = "=1.9.0" }
solana-vote-program = { path = "../programs/vote", version = "=1.9.0" }
tokio = { version = "1", features = ["full"] }
[target.'cfg(not(target_env = "msvc"))'.dependencies]
jemallocator = {package = "tikv-jemallocator", version = "0.4.1", features = ["unprefixed_malloc_on_supported_platforms"]}
[dev-dependencies]
assert_cmd = "2.0"

View File

@ -833,6 +833,12 @@ fn assert_capitalization(bank: &Bank) {
let debug_verify = true;
assert!(bank.calculate_and_verify_capitalization(debug_verify));
}
#[cfg(not(target_env = "msvc"))]
use jemallocator::Jemalloc;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
#[allow(clippy::cognitive_complexity)]
fn main() {